In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to configure the two parent in springboot. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Method of configuring two parent
You need to add spring-boot-starter-parent before adding dependencies to the pom.xml file.
Springboot-starter- parent mainly provides the following default configuration
Java version uses 1. 8. 0 by default.
The encoding format defaults to UTF-8.
Provide Dependency Management for version management of project dependencies.
Default resource filtering and plug-in configuration.
Although spring-boot-starter-parent is convenient, it is common to develop micro-service projects or multi-module projects in a company.
You need to use the company's own parent. At this time, if you still want to manage the project dependent version, you need to use the
DependencyManagement has come to realize. Add the following code to the pom.xml file:
It should be noted here that type is pom,scope and import
Org.springframework.boot spring-boot-dependencies 2.0.4. RELEASE / / Note here that type is pom,scope and import pom import
At this point, you don't have to inherit spring-boot-starter-parent, but the version of Java, the format of the encoding, etc.
Developers configure it manually. The configuration of the Java version is very simple, just add a plugin.
A simple understanding of parent
When we create a SpringBoot project, we can inherit from a spring-boot-starter-parent.
The basic functions of org.springframework.boot spring-boot-starter-parent 2.4.3 parent are
Defines the compiled version of Java
Encoding using UTF-8 format
Parent inherits from spring-boot-dependencies, which defines the dependent version
Configuration to perform packaging operation
Automated resource filtering
Automated plug-in configuration
The above content is what is the method of springboot implementation to configure two parent, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.