栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

springboot2.4之后无需再手动移除spring-boot-configuration-processor

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

springboot2.4之后无需再手动移除spring-boot-configuration-processor

在springboot2.3.4.RELEASE官方文档中,说到如果已经配置了@ConfigurationProperties,那么需要配置spring-boot-maven-plugin以防spring-boot-configuration-processor被打包到java文件中,减少空间占用。

来源:https://docs.spring.io/spring-boot/docs/2.3.4.RELEASE/reference/html/appendix-configuration-metadata.html#configuration-metadata-annotation-processor-setup


但在springboot2.5文档(当前版本)就没用提到这一点了。查看2.4版本更新记录(https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes):

找到了答案:

When generating runnable Spring Boot jars, empty starter dependencies will now be automatically removed. Since most starters only provide transitive dependencies, there is little point in packaging them in the final jar.

Spring Boot annotation processors are also removed as well as they are only useful during the build. These are spring-boot-autoconfigure-processor and spring-boot-configuration-processor.

因为Spring Boot annotation processors只是在开发阶段被用到,所以springboot自动移除了,无需再手动移除了。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/282434.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号