配置文件application.properties不会编译到target/classes目录下,所以读取不到配置文件
学习springboot集成jsp报错错误信息如下:Circular view path [say]: would dispatch back to the current handler URL [/say] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, du
·
学习springboot集成jsp报错
错误信息如下:
Circular view path [say]: would dispatch back to the current handler URL [/say] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
解决方法如下:
<resource>
<!--源文件-->
<directory>src/main/webapp</directory>
<!--指定编译到META-INF/resources-->
<targetPath>META-INF/resources</targetPath>
<!--指定源文件夹中的那个资源要编译进行 -->
<includes>
<include>*.*</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*.*</include>
</includes>
</resource>
可能是默认的编译环境有问题,添加了第一个resource配置的时候,发现配置文件application.properties不会编译到target/classes目录下,所以读取不到配置文件,将原本默认的resource自己重写一遍就行了,神奇
页面访问时报错如下:
后台报错信息如下:
百度了很久,很多网友说什么,把注解@Controller改成@RestController,但是我改了不起效,最后问了大神才发现这个报错这样解决
更多推荐
所有评论(0)