-
Notifications
You must be signed in to change notification settings - Fork 12
CT Property Source
Aditya Ketkar edited this page Feb 17, 2018
·
1 revision
In Spring, you can use @PropertySource
annotation to externalize your configuration to a properties file.
The @PropertySource
annotation is used to add any source of key-value pairs to spring’s Environment. The Environment object represents the spring environment in which the current application is running.
[The class mentioned above uses @PropertySource
to autowire an Environment field, which it then passes to ElasticSearchFactoryImpl.java. This class extracts the values corresponding to specific keys from a file specified.]
- Development Workflow
- Coding Standards
- Coding Style
- Code Profile
- Coding Tutorials
- Branch History
- Refactoring Suggestions