1. Create a new SPRING BOOT project, what do not choose
2. Create a maven on the basis of this project (the project is not SPRING BOOT) project, what do not choose
3. The creation of a project's POM references, WEB projects are cut into 2 created
4. Start the class at SRC 1 to create a project, WEB cut into 2 projects created in the
@SpringBootApplication
public class MyApp extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(MyApp.class);
}
}
The non-SPRING BOOT all dependencies are put under item 1 under dependencyManagement
6. The second item of configuration increases the WEB, as follows
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<! - This plug-in main purposes: to build an executable JAR ->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<warName>dbmigration</warName>
</configuration>
</plugin>
</plugins>
</build>