Spring Boot Series-(i) Getting Started

Source: Internet
Author: User
Tags java web

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.