1 Join in Pom.xml
<parent>
<groupId>org.springframework.boot</groupId> <artifactid>spring-boot-starter-parent</ Artifactid> <version>1.5.2.RELEASE</version>
</parent>
<dependencies>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId> Spring-boot-starter-web</artifactid> </dependency>
<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactid>mybatis-spring-boot </artifactId> <version>1.2.0</version>
</dependency> <dependency> <groupId>mysql</groupId> <artifactId> Mysql-connector-java</artifactid> </dependency>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId> Spring-boot-starter-data-jpa</artifactid> </dependency>
<dependency> <groupId>org.springframework.boot</groupId> <artifactId> Spring-boot-starter-thymeleaf</artifactid> </dependency>
</dependencies>
2 in Resources\templates\hello.html
3 adding in Controller
@RequestMapping ("/hello") public String hellohtml (hashmap<string,object> map) {
}
Start, and then enter Localhost:8080/hello
Will jump to the page
Note: You must join the Thymeleaf package, or you will not find
Springboot Accessing HTML files