第一步:创建一个SpringBoot项目
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
第二步:写一个controller测试接口能否调通
@Controller
public class VIPController {
@RequestMapping("/play")
public String play() {
return "play";
}
}
第三步:编写前端页面
<!DOCTYPE html>
<html