https://www.thymeleaf.org/
引入
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>
把静态文件放入templates文件夹下就可以自动渲染thymeleaf
@RequestMapping("/ok") public String abc() { return "success"; }