Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 循环视图路径[login]:将再次分派回当前处理程序URL[/login]_Spring_Spring Boot_Spring Mvc_Thymeleaf - Fatal编程技术网

Spring 循环视图路径[login]:将再次分派回当前处理程序URL[/login]

Spring 循环视图路径[login]:将再次分派回当前处理程序URL[/login],spring,spring-boot,spring-mvc,thymeleaf,Spring,Spring Boot,Spring Mvc,Thymeleaf,循环视图路径[login]:将再次分派回当前处理程序URL[/login]。检查您的ViewResolver设置!提示:这可能是由于生成默认视图名称而导致的未指定视图。添加此依赖项 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </depe

循环视图路径[login]:将再次分派回当前处理程序URL[/login]。检查您的ViewResolver设置!提示:这可能是由于生成默认视图名称而导致的未指定视图。

添加此依赖项

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
添加此依赖项

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
我在相关控制器上添加了@ResponseBody注释,问题已经解决

注意:我的工作是通过另一个rest服务添加一个实体

之前:

@PostMapping("/bayiKaydet")
    public Bayi bayiKaydet(@RequestBody Bayi bayi) {
        serverUrl+="bayiKaydet";
        
        restTemplate.postForEntity(serverUrl, bayi, Bayi.class);
        serverUrl = "http://localhost:8090/";
        return bayi;
    }
之后:

@PostMapping("/bayiKaydet")
    @ResponseBody
    public Bayi bayiKaydet(@RequestBody Bayi bayi) {
        serverUrl+="bayiKaydet";
        
        restTemplate.postForEntity(serverUrl, bayi, Bayi.class);
        serverUrl = "http://localhost:8090/";
        return bayi;
    }
我在相关控制器上添加了@ResponseBody注释,问题已经解决

注意:我的工作是通过另一个rest服务添加一个实体

之前:

@PostMapping("/bayiKaydet")
    public Bayi bayiKaydet(@RequestBody Bayi bayi) {
        serverUrl+="bayiKaydet";
        
        restTemplate.postForEntity(serverUrl, bayi, Bayi.class);
        serverUrl = "http://localhost:8090/";
        return bayi;
    }
之后:

@PostMapping("/bayiKaydet")
    @ResponseBody
    public Bayi bayiKaydet(@RequestBody Bayi bayi) {
        serverUrl+="bayiKaydet";
        
        restTemplate.postForEntity(serverUrl, bayi, Bayi.class);
        serverUrl = "http://localhost:8090/";
        return bayi;
    }

请提供代码示例。请提供代码示例。