问题描述
在测试SpringSecurity时发现controller中的页面无法被识别到,页面是放在templates下的,启动springboot后发现请求无法定位到指定的页面,报500错误。
解决
发现咋创建项目时忘记引入thymeleaf模块依赖了
<!--thymeleaf-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
成功解决。。。