首页  

spring-boot-starter-parent的作用     所属分类 spring 浏览量 1190
springboot 项目 pom 一般会继承   spring-boot-starter-parent



<parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>2.0.0.RELEASE</version>
</parent>



org/springframework/boot/spring-boot-starter-parent/2.0.0.RELEASE/spring-boot-starter-parent-2.0.0.RELEASE.pom

The parent project provides the following features:

Java 1.8 as the default compiler level.
UTF-8 source encoding.
A Dependency Management section, inherited from the spring-boot-dependencies pom, that manages the versions of common dependencies. This dependency management lets you omit version tags for those dependencies when used in your own pom.
Sensible resource filtering.
Sensible plugin configuration (exec plugin, Git commit ID, and shade).
Sensible resource filtering for application.properties and application.yml including profile-specific files (for example, application-dev.properties and application-dev.yml)

spring-boot-dependencies 定义依赖版本

1.指定java版本为1.8
2.编码格式默认使用utf-8
3.Dependency Management 依赖版本管理
4.默认的资源过滤与插件管理



<properties>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <resource.delimiter>@</resource.delimiter>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>${java.version}</maven.compiler.target>
</properties>


maven.compiler.source
maven.compiler.target
project.build.sourceEncoding


spring-boot-starter-parent 继承spring-boot-dependencies


<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-dependencies</artifactId>
    <version>2.0.0.RELEASE</version>
    <relativePath>../../spring-boot-dependencies</relativePath>
</parent>


注意 relativePath ../../spring-boot-dependencies 

org/springframework/boot/spring-boot-dependencies/2.0.0.RELEASE/spring-boot-dependencies-2.0.0.RELEASE.pom

上一篇     下一篇
springboot2启动过程简单分析

常用负载均衡算法

注解组合和继承

spring5实例之AnnotationConfigApplicationContext使用

spring Java Config 相关注解及注意点

logback pattern 配置