Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Jul 18 22:09:03 CST 2016
There was an unexpected error (type=Internal Server Error, status=500).
Circular view path [test]: would dispatch back to the current handler URL [/testController/test] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
剧情描述:本人
springboot,版本1.3.6.RELEASE
application.properties:
spring.view.prefix:/WEB-INF/jsp/
spring.view.suffix:.jsp
application.message:Hello Phil
报上述错误。
找找,各种原因都尝试了,都tm报错
网上写的,都tm继承(版本可能是其他的)这个
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-samples</artifactId>
<version>1.2.0.BUILD-SNAPSHOT</version>
</parent>
你们都测试了吗,反正我这个粘贴进去,提示找不到这个文件。不行。
下面是重点,解决办法
有两种,意思说,两种都可以解决
第一种
application.properties:
spring.mvc.view.prefix:/WEB-INF/jsp/
spring.mvc.view.suffix:.jsp
application.message:Hello Phil
(看清楚了,是spring.mvc)
第二种
springboot,版本1.3.6.RELEASE版本更换为:1.2.5.RELEASE(此版本是我测试可以使用的。其他版本可能也可以,可我不知道,也没测试。)
这个配置文件,还是原来的。
application.properties:
spring.view.prefix:/WEB-INF/jsp/
spring.view.suffix:.jsp
application.message:Hello Phil
这是一个很扯的问题。不知道是不是一个bug,或者是springboot升级了,把原来的放弃了!!哎!折腾了半天
最后附上我可以跑的测试demo
https://pan.baidu.com/s/1jHDwbzg