Spring 循环视图路径[login]:将再次分派回当前处理程序URL[/login]
循环视图路径[login]:将再次分派回当前处理程序URL[/login]。检查您的ViewResolver设置!提示:这可能是由于生成默认视图名称而导致的未指定视图。添加此依赖项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
<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;
}
请提供代码示例。请提供代码示例。