Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to add multiple properties file in spring configuration

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.08k
    Comment on it

    Here we have configured the spring mvc configuration. In @ComponentScan we can give the path where we have our components(like controller, model, dao etc).

    For adding the single properties file we use: @PropertySource("")

    and for multiple files we use: @PropertySources({ @PropertySource(""), @PropertySource("") })

    @ComponentScan(basePackages = "*")
    public class CustomConfiguration extends WebMvcConfigurerAdapter {
         //other configuration details like view resolver, data source, hibernate setting etc.

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: