2021-07-10

【1】IDEA Cannot resolve MVC view 'userInfo’报错解决方法

springboot项目,返回templates目录下HTML界面时报错,已解决。

在这里插入图片描述

解决方法:在pom.xml文件中添加thymeleaf依赖项。

在这里插入图片描述
下面是 代码,版本可自己调整。

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

然后就可以解析了,按ctrl键单击可跳转到对应页面。

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_44847590/article/details/118642802