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.

Sizin İçin Seçtik  Is field same as attribute?

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

Sizin İçin Seçtik  How do you create a property file?

Leave a Reply

Your email address will not be published. Required fields are marked *