0

I have spring application that is configured by Spring annotation and I need to load complex spring xml configuration that is dependent on env system property. is it possible to do it in annotation? I need something like is in @ImportResource (it is only my idea):

@ImportResource("classpath:spring/${env:dev} == dev ? config-dev.xml : config.xml")
@Configuration
public class AppConfig{

}

I can have these env: dev, prod, uat and I need to ensuere that for dev I will load config-dev.xml otherwise I need to load config.xml. Is it possible to do something like this in @ImportResource?

user1604064
  • 809
  • 1
  • 9
  • 29

0 Answers0