One: (Happiest to learn Spring boot) Spring boot's pom.xml file description

In a maven project, pom.xml mainly describes the maven coordinates of the project, dependencies, rules that developers need to follow, defect management system, organization and licenses, and all other project-related factors. It is a project-level configuration file.

First, the basic attributes of the project.

A maven project includes model version, organization unique identifier Group Id, project unique identifier Artifact Id, packaging type Packaging, project version Version.


Second, define constants: define the project uniform character set encoding project.build.sourceEncoding, project.reporting.outputEncoding, java JDK version java.version, spring-cloud version spring-cloud.version


Three, specify the parent,

The spring boot project must specify the parent as spring-boot-starter-parent. The basic properties of spring have been defined in Parent. The version number of spring is specified, and there is no need to specify the version number in dependencies. Parent also includes a large number of other default configurations, which greatly simplifies our development.


4. Dependency configuration

The Spring boot project introduces the spring-boot-starter-web configuration to specify the packages that the project depends on. MavenDependencies will automatically manage these referenced packages.


Fifth, the introduction of plug-ins





Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324429679&siteId=291194637