pring boot dependent parent, introduced after the introduction of the relevant version does not need to add configuration, spring boot automatically selects the most appropriate version to add it.
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.1.4.RELEASE</version> </parent>
java.version specify jdk version number:
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> </properties>
Add spring-boot-starter-web-dependent
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>