简体   繁体   中英

Spring Boot Actuator doesn't read git.properties

I have a simple project with Spring Actuator, also i have a maven plugin generating git.properties (resides in classes directory).

However when i run my app, /actuator/info request shows:

{
"git": {}
}

Documentation says autoconfigure should pick up properties automatically https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready-application-info-git

My mistake, git.properties was not a 'properties' file in fact. I didn't see {} around a file content.

after changing configuration/format to properties in git-commit-id-plugin plugin, it works (plugin was generating git info in json)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM