异常:
javax.servlet.ServletException: Could not resolve view with name 'XXX' in servlet with name 'dispatcherServlet'
解决
1.是否是包没有导入
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
2.ModelAndView是的导错误
import org.springframework.web.servlet.ModelAndView