1. Create a new, empty Maven project.
2, modify Pom.xml:
Add spring Boot's parent dependency (spring-boot-starter-parent), which is a special starter to provide the relevant MAVEN default dependencies-such a project is the Spring boot project. Default dependency, which is version default, some common dependencies can be removed <version> tags. As to which jar packages the spring boot is dependent on, and how much the version defaults to, see the \org\springframework\boot\spring-boot-dependencies\ directory in the local repository (if available locally) Spring-boot-dependencies.pom file.
<Projectxmlns= "http://maven.apache.org/POM/4.0.0"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupId>com.qfedu</groupId> <Artifactid>Springboot</Artifactid> <version>1.0</version> <Parent> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-starter-parent</Artifactid> <version>2.0.0.m2</version> <RelativePath/> </Parent> <Build> <Plugins> <!--Spring Boot's compile plugin - <plugin> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-maven-plugin</Artifactid> </plugin> </Plugins> </Build> <!--The milestone version is used here. If you use the official version, you do not need the following configuration - <repositories> <Repository> <ID>Spring-snapshots</ID> <name>Spring Snapshots</name> <URL>Https://repo.spring.io/snapshot</URL> <Snapshots> <enabled>True</enabled> </Snapshots> </Repository> <Repository> <ID>Spring-milestones</ID> <name>Spring Milestones</name> <URL>Https://repo.spring.io/milestone</URL> <Snapshots> <enabled>False</enabled> </Snapshots> </Repository> </repositories> <pluginrepositories> <pluginrepository> <ID>Spring-snapshots</ID> <name>Spring Snapshots</name> <URL>Https://repo.spring.io/snapshot</URL> <Snapshots> <enabled>True</enabled> </Snapshots> </pluginrepository> <pluginrepository> <ID>Spring-milestones</ID> <name>Spring Milestones</name> <URL>Https://repo.spring.io/milestone</URL> <Snapshots> <enabled>False</enabled> </Snapshots> </pluginrepository> </pluginrepositories> <Dependencies> <!--Web-supported starter Pom - <Dependency> <groupId>Org.springframework.boot</groupId> <Artifactid>Spring-boot-starter-web</Artifactid> </Dependency> </Dependencies></Project>
Create a new entry class (Artifactid + Application naming convention) and declare the Ingress class directly as a simple controller as a test:
MAVEN builds Spring boot project manually