spring-boot-starter-parent作用

it2024-03-12  63

SpringBoot项目一般都会配置starter-parent依赖。

示例:

<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> <relativePath/><!-- lookup parent from repository -->   </parent>

 

其主要作用:

指定编码格式默认使用utf-8。指定java版本默认使用1.8。提供Dependency Management进行项目依赖的版本管理,如指定实际依赖的版本号(已经做版本兼容性测试)。默认的资源过滤和插件管理。
最新回复(0)