In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
Many novices are not very clear about the design concept and goal and the overall structure of SpringBoot. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
Source code reading tool
Readers can choose familiar code reading tools according to their daily habits, such as Intellij IDEA, Spring Tool Suite, Eclipse, MyEclipse and so on.
Before reading the Spring Boot source code, we also need to set up a basic reading environment. Spring Boot has certain requirements for JDK and build tools, such as JDK 8 +, Maven 3.3 +, Gradle 5.x + and other environments to meet the corresponding requirements.
In order to achieve better learning results, it is recommended that we use the example + debug model for learning. Therefore, the source code reading I has the best support for instance writing, running, debugging and other functions.
This paper uses Itellj IDEA (IDEA for short) as a code reading tool, using pure source code reading and example + debug mode to learn.
Among them, the pure source code reading mode can help us to better comment, write, unit test and other operations, while the example + debug mode can make us better understand the running process of the whole project and the specific use of functions. Figures 1-2 and 1-3 show two modes of reading code through IDEA.
Design concept and goal of Spring Boot
We know that one of the powerful features of Spring is the ability to integrate all kinds of open source software. However, with the rapid development of the Internet, a variety of frameworks emerge in endlessly, which puts forward new requirements for the flexibility, scalability, scalability and high availability of the system architecture. With the development of the project, Spring slowly integrates more open source software and introduces a large number of configuration files, which will lead to high error rate and inefficiency. In order to solve these situations, Spring Boot came into being.
Spring Boot itself does not provide the core functions of Spring, but serves as the scaffolding framework of Spring to achieve the purpose of quickly building the project, preset tripartite configuration, and ready to use out of the box.
Design concept
Convention over configuration (Convention Over Configuration), also known as programming by agreement, is a software design paradigm designed to reduce the number of decisions that software developers need to make, and it is simple and flexible to implement. The core design of Spring Boot perfectly follows this paradigm.
The function of Spring Boot from details to the whole is based on "convention is superior to configuration development," from the construction of the basic framework, configuration files, integration of middleware, built-in containers and various Starters in its ecology, all follow this design paradigm Starter.
As one of the core functions of Spring Boot, automatic configuration modules and dependencies are provided based on automatic configuration code, which makes software integration simple and easy to use. At the same time, Spring Boot is encouraging software organizations to create their own Starter.
Design goal
When it comes to the design goals of Spring Boot, it is worth mentioning that Spring Boot's R & D team-Pivotal. Pivotal's corporate goal is to change the way the world constructs software (Weare transforming how the worldbuilds software). Pivotal Company provides cloud native application development PaaS platform and services to enterprise customers, and uses agile software development methodology to help enterprise customers develop software, thereby improving the work efficiency of software developers, reducing software operation and maintenance costs, realizing enterprise digital transformation, IT innovation, and helping enterprise customers finally achieve business innovation.
The design concept of the Spring Boot framework perfectly complies with the goals of the enterprise to which it belongs. Instead of providing new solutions to solved problems, Spring Boot brings a new experience for platforms and developers: integrating mature technical frameworks, shielding system complexity, and simplifying the use of existing technologies, thereby reducing the threshold for the use of software and improving the efficiency of software development and operation and maintenance.
The overall architecture of Spring Boot
The core project structure and functions of Spring Boot have been introduced in Section 1.2. in this section, we have solved the dependency between different modules of Spring Boot from the architectural level, as shown in figure 1-4.
In figure 1-4, in order to express the relationship between Spring Boot projects more clearly, we omit some of the dependencies based on the transitivity of dependencies. For example, SpringBoot Starters relies not only on the SpringBoot Autoconfigure project, but also on SpringBoot and Spring, while the SpringBoot Autoconfigure project relies on SpringBoot, and SpringBoot relies on Spring-related projects. Therefore, the association between Spring Boot Starters and underlying dependencies is omitted in the figure.
Spring Boot Parent is the Spring Boot and the Parent project that depends on the Spring Boot project in the figure, and for the sake of clarity, the correlation is not shown in the diagram.
From figure 1-4, we can clearly see that Spring Boot is almost entirely based on Spring, providing both Spring Boot and Spring Boot Autoconfigure core modules, while other related functions are based on these two core modules. The source code analysis related to this paper is also carried out around two core modules.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.