Simply annotation the class field with @Value annotation providing the name of the property you want to read from application. properties file and class field variable will be assigned that value . Here is an example of Rest Controller that uses @Value annotation to read the app.
How do you set values in application properties?
Simply annotation the class field with @Value annotation providing the name of the property you want to read from application. properties file and class field variable will be assigned that value . Here is an example of Rest Controller that uses @Value annotation to read the app.