springboot项目git仓库打包携带版本信息

前提

  • 项目基于git管理工具
  • jdk1.8+springboot2.0.4版本

maven配置git插件


	pl.project13.maven
	git-commit-id-plugin

application.properties添加展示

management.endpoints.web.exposure.include=*
management.endpoints.web.base-path=/actuator
management.endpoint.health.show-details=always
management.info.git.mode=full

启动后访问/actuator/info即可看到git版本信息

springboot项目git仓库打包携带版本信息_第1张图片

你可能感兴趣的:(SpringBoot)