Objective
Because the project team needs to perform microservices transformation, the development of microservices needs to be based on spring boot. So we need to understand springboot first.
Let's take a look at the background of Springboot, what Springboot is, a simple example of Springboot project
The origin of the 1.SpringBoot background
What did springboot do to solve the problem?
Let's take a look at what we need to do before spring boot, as a Java developer, to develop a new Web project from scratch.
First, we create a Java Web project that uses MAVEN to manage the jar package
Second, modify the Pom file to add a third-party jar package
Third, configure Web. XML (or a Webapplicationinitializer implementation), which declares the Dispatcherservlet
IV. Configure the configuration required in components such as spring and MVC
Five, develop business functions
Six, build the war package, deploy the project into Tomcat
In summary, it takes so many steps to create a new project.
If there is a simpler way, the original need for your small half a day to do a good job, now it takes only more than 10 minutes to do well, it is not better
So spring boot was born. How clever a man is.
What is 2.Spring boot?
Spring Boot is a framework that simplifies building spring applications and simplifies the development process.
Spring Boot mode development is a bit of a disruptive change to traditional web development:
First, the Springboot application uses jars to run, whereas the traditional pattern is to deploy the war package into the servlet container. The use of the jar pattern helps ease the functionality of the OPS staff and is easier to use in the run environment of the cloud platform such as Docker.
Second, Springboot is the application launch container, while the traditional mode container launches the application. One advantage of spring boot is that the program itself manages the container version, and the business code is directly bound to the running container.
Thirdly, Springboot uses a large number of autoconfig for probing and application configuration, which makes the code configuration very simple, but the internal processing details are also hidden deep.
3. A simple spring boot example Project
Spring Boot Series-(i) Getting Started