I am importing a yaml config file onto my main ServerConfig class. However when I am bringing up the server, it is setting the new yaml file as the applicationConfig & ignoring the properties set in application.yml. Ideally it should append the new config but without ignoring the base application.yml. How can I fix this?
Main config class
@Configuration
@EnableScheduling
@Import({
NewPropertiesConfig.class
})
@EnableConfigurationProperties({...})
public class ServerConfig extends AbstractConfig {
...
}
NewPropertiesConfig.class
@Configuration
@PropertySource(
value = {"classpath:abc-client.yaml"},
factory = YamlPropertySourceFactory.class
)
public class NewPropertiesConfig {
public NewPropertiesConfig() {
}
}