# 在application.properties中配置spring.thymeleaf.prefix=classpath:/templates/spring.thymeleaf.suffix=.htmlspring.thymeleaf.encoding=UTF-8spring.thymeleaf.mode=HTML5
在Pom.xml添加依赖<!-- 静态页面跳转--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency>
不能用@RestController@Controllerpublic class TestController {@RequestMapping("login")public String hello(){return "login";}}@RequestMapping("hh")public String hh(){return "hah/hee";}