Gyu*_*Lee 3 java spring freemarker kotlin spring-boot
将 spring-boot-parent 升级到 后2.2.0.RELEASE,我基于 freemarker 的 Spring Boot Web 应用程序无法正确处理请求。
我有一个@Controller,供应/hello用src/main/resources/templates/hello.ftl。
@Controller
class HelloController() {
@RequestMapping(value = ["/hello"])
fun hello(): String {
return "hello"
}
}
Run Code Online (Sandbox Code Playgroud)
根据要求,它只会出现在一个错误页面上,上面写着There was an unexpected error (type=Not Found, status=404).。
错误堆栈跟踪并没有说太多。它只是说org.springframework.web.servlet.resource.ResourceHttpRequestHandler: Resource not found。
我pom.xml的基本上如下:
@Controller
class HelloController() {
@RequestMapping(value = ["/hello"])
fun hello(): String {
return "hello"
}
}
Run Code Online (Sandbox Code Playgroud)
在升级到 Spring Boot 2.2.0.RELEASE 之前,它运行得非常好。
这里有什么问题?
| 归档时间: |
|
| 查看次数: |
887 次 |
| 最近记录: |