Do you know Spring Boot? Talk about Spring Boot!

What exactly is Spring Boot

Before understanding Spring Boot, you should first understand Spring, because the core of Spring Boot is built on Spring. Spring is an open source framework created by Rod Johnson in 2002. Spring has been developing rapidly since its creation. It has become the de facto standard in J2EE development. But with the rapid development of IT technology, and IT projects become more and more complex. If you have studied Spring, you know that Spring relies heavily on xml files for configuration. Sometimes a project has dozens of xml configuration files. These cumbersome configurations and the configuration problems of Spring integration with third-party frameworks. It often leads to low development efficiency, accidental failures, and sometimes failure to release the version, causing economic losses to the company.

Spring Boot is a brand new framework created by the Pivotal team and released in 2014. Its design goal is to simplify the construction, development and deployment of Spring applications. Spring Boot uses a specific way to configure, so that developers no longer need to configure cumbersome xml files. To put it simply, Spring Boot is not a new framework. It abandons the xml configuration method and uses a new configuration method; then it uses the starter method in maven to integrate many third-party frameworks and provides many defaults. Configuration parameters.

Spring Boot official website, like [Figure 1] a paragraph:

figure 1

This passage is similar to my explanation above.

Why can't Spring Boot not learn

Spring Boot has developed from 1.0 to 2.0 in just four years; and it has become popular in China in just four years. Both small companies and large companies are using it.

1. What can Spring Boot do

Open the Spring official website, what catches our eyes is the following picture [Figure 2]:

figure 2

Looking at the block in the figure, we know that Spring's official positioning for Spring Boot is Build Anything, which means that Spring Boot can build anything. Spring Boot aims to build Java applications quickly, efficiently and with minimal configuration. After learning Spring Boot, there are more advanced Spring Cloud and Spring Cloud Data Flow.

Spring Cloud's positioning is Coordinate Anything (coordinate anything)

The positioning of Spring Cloud Data Flow is Connect Everything (connect anything)

After careful consideration of Spring Cloud and Spring Cloud Data Flow, I found that both Cloud and Data are associated with the most popular technologies now. Cloud corresponds to cloud and Data corresponds to data. Spring Cloud and Spring Cloud Data Flow are based on Spring Boot, so Spring Boot must be learned first.

2. Enterprise recruitment requirements for Spring Boot and Spring Boot's Baidu search index

Open domestic well-known recruitment websites, for example, search on Liepin.com, you can find that many Java-related positions have requirements for Spring Boot technology. As shown below [Figure 3] This Oralce company's recruitment position requires Spring Boot in the job description of the recruitment.

image 3

Spring Boot Yanran has become a necessary skill for Java programmers to fight monsters and upgrade. Not to mention how important Spring Boot is.

Let's look at the Baidu search index of the keyword Spring Boot. Since Spring Boot was launched in 2014, the search index of Spring Boot in Baidu has been steadily increasing [Figure 4]. It shows that programmers or companies are very concerned about Spring Boot.

Figure 4

3. Benefits of Spring Boot

What are the benefits to developers after using Spring Boot? What convenience can it bring to operation and maintenance personnel? Even what economic benefits can it bring to the company? Look at the picture [picture 5] speak:

Figure 5

1. Based on Spring

Spring Boot is based on Spring, so Spring has the advantages of Spring Boot. It does not require developers to learn a new framework, and the learning threshold is relatively low.

2. Fast coding

Spring Boot's dependency packages are provided based on maven's pom file, and Spring Boot itself integrates a lot of third-party frameworks. In the past, when developing Spring applications, the libraries of third-party frameworks that needed to be used need to be searched by developers one by one; now it is not necessary, and some may only need to introduce a pom.xml, and a large number of third-party libraries that need to be used Automatically introduced into the project. Therefore, the development workload is reduced and rapid coding is achieved.

3. Modular

Projects developed based on Spring Boot can easily implement modular programming, so that the division of labor and cooperation of projects can be very effective, and code conflicts in the development process can be reduced. Modular programming can also be very efficient to reduce the amount of code changes, modify modules as needed, and reduce the probability of production accidents.

4. Simple configuration

At the beginning of the article, it was said that Spring Boot abandoned the cumbersome xml configuration file. A large number of configuration files are often the cause of production accidents. Spring Boot uses a large number of configuration files in the form of yml plus corresponding Annotations, which greatly reduces the number of configuration files. Because the previous Spring application introduced a third-party framework, it might be necessary to add a configuration file. For example, if you want to introduce the database connection pool HikariCP in the project, you need to add a configuration file about the HikariCP database connection pool, but using Spring Boot and HikariCP may only need a few lines of configuration, because Spring Boot defaults Integrate HikariCP database connection pool and provide many default configurations.

5. Convenient deployment

Spring Boot is born for simple and fast deployment. SpringBoot embeds Tomcat, no additional deployment of application server Tomcat is required, just a simple Java runtime environment, and the startup command is also very simple: java -jar xxx-release.jar. At the same time, Spring Boot can quickly implement cluster deployment by combining Docker and Kubernetes, which are very popular technologies.

6. Effective monitoring

Spring Boot integrates a very efficient monitoring framework. As long as you simply introduce a dependency on spring-boot-start-actuator, you can monitor service performance. Combined with Spring Cloud, all-weather monitoring of the entire microservice link can be achieved.

Guess you like

Origin blog.csdn.net/Java_Yhua/article/details/110147294
Recommended