This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyAppCtxInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { | |
private static Logger LOG = LoggerFactory.getLogger(MyAppCtxInitializer.class); | |
@Override | |
public void initialize(ConfigurableApplicationContext applicationContext) { | |
ConfigurableEnvironment environment = applicationContext.getEnvironment(); | |
try { | |
environment.getPropertySources().addFirst(new ResourcePropertySource("classpath:env.properties")); | |
LOG.info("env.properties loaded"); |