Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the background and advantages of spring boot?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "what is the background and advantages of the birth of spring boot". In the daily operation, I believe that many people have doubts about the background and advantages of the birth of spring boot. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about the birth background and advantages of spring boot. Next, please follow the editor to study!

The background of spring boot's birth

Before the advent of spring boot, programmers using the spring framework configured the web application environment in this way, requiring a lot of xml configuration. The following figure shows the difference between the amount of xml configuration and the amount of SpringBoot configuration.

With the increasing number of web project integration software, xml configuration is also increasing, xml configuration files are also increasing, and project dependency management is becoming more and more complex. As a result, the spring framework is controversial, and configuration files are difficult to understand and error-prone.

Xml configuration files are not only complex, but most of them are template configurations, that is, more than 80% of the configurations are repeated over time. If you configure this in this web project and move it to another project, this part of the configuration remains the same.

Therefore, lightweight web development frameworks like JFinal gradually have a lot of room for development because of their easy-to-use features. The Spring community is also increasingly aware of this problem, and at the SpringOne 2GX conference in 2013, Pivotal's CTO Adrian Colyer responded to questions about the complexity of using the spring framework, noting that one of the future goals of the platform is to achieve XML-free configuration and provide a better development experience. This is the main reason for the birth of spring boot that we use today.

There are strong commercial companies behind the Spring open source community, and the known companies with strong support are Pivotal, netflix and Alibaba of China.

What has spring boot changed?

Take an example: connect your own wires and standardized sockets

The configuration of Spring Boot, like plugs and sockets, is this standard. If you want to access your third-party open source library, you can do a starter adaptation according to this standard. Spring MVC is like manually connecting wires, which is very flexible, but different people have different effects and are prone to mistakes. Spring boot is not as flexible as Spring MVC, and you don't know what the wiring in the socket looks like, but it's easy to use. Then again, when you are used to using plugs and sockets, do you expect to be an electrician?

The goal of Spring Boot is not to provide new solutions for solved problem areas, but to bring a new development experience to the platform, thus simplifying the use of these existing technologies.

Simplify the configuration

Make monitoring easier

Make deployment easier

Make development easier

How can these changes be realized? please learn the following chapters!

Main characteristics of Spring Boot

Follow the principle of "convention is better than configuration" to simplify configuration

Can be completely separated from the XML configuration file, using annotated configuration and java Config

Embedded Servlet container, the application can be executed with jar package: java-jar

Quickly complete the project construction, integrate the third-party class library, easy to use

Provides starter POM, which is very convenient for package management and simplifies package management configuration.

Naturally integrated with Spring cloud, spring boot is the best solution to implement micro-services in java system.

Steps for Spring Boot to integrate third-party class libraries

Introduction of springboot-XXXX-starter through maven

Modify the ymal or properties global unified configuration file

Join a Java Config. This is a personalized configuration, and if you use a generic configuration, this step is not required.

At this point, the study of "what are the background and advantages of spring boot" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report