springboot整合thymeleaf报错

错误信息:
javax.servlet.ServletException: Circular view path [index]: would dispatch back to the current handler URL [/hello/index] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
这并不是什么路径出错,而是我在使用本地maven仓库的时候thymeleaf没导入完全,之前只有

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

还需要再导入

        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf-spring5</artifactId>
        </dependency>

成功解决

posted @ 2021-09-23 00:54  zhiless  阅读(122)  评论(0编辑  收藏  举报