Ask Your Question
0

Can one identify if a property value has been overwritten in Spring Boot?

asked 2023-05-19 03:01:24 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-05-19 03:22:01 +0000

bukephalos gravatar image

Yes, one can identify if a property value has been overwritten in Spring Boot by following these steps:

  1. Enable debug logging in the application.properties file:
logging.level.org.springframework.boot.autoconfigure=DEBUG
  1. Start the application and look for the property values in the log output.

  2. If a value is overwritten, it will appear in the log output with the prefix "Overriding property".

  3. Additionally, one can use the Spring Boot Actuator endpoint /configprops to see all the properties and their sources. If a property has been overwritten, its source will be different from the default source.

http://localhost:8080/actuator/configprops
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-19 03:01:24 +0000

Seen: 15 times

Last updated: May 19 '23