Reference: Spring Docs - @ConfigurationPropertiesarrow-up-right
An annotation that retrieves and binds property values from *.properties or *.yml files to Java classes
*.properties
*.yml
Using this annotation automatically handles binding for various notation styles
ex)
acme.myProject.person.firstName
Standard camel case syntax.
acme.my_project.person.first_name
Notation usable in .properties and .yml (dash notation is more standard)
ACME_MYPROJECT_PERSON_FIRSTNAME
Recommended when using system environment variables
The property file must be registered as a Bean for it to work properly
Last updated 18 days ago