package de.fred4jupiter.fredbet;

import java.util.Arrays;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * Will be used to activate additional profiles in dev profile.
 * 
 * @author MIS
 *
 */
public class AppInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {

	private static final Logger LOG = LoggerFactory.getLogger(AppInitializer.class);

	@Override
	public void initialize(ConfigurableApplicationContext applicationContext) {
		ConfigurableEnvironment environment = applicationContext.getEnvironment();
		if (environment.acceptsProfiles(FredBetProfile.DEV)) {
//			environment.addActiveProfile(FredBetProfile.DEMODATA);
//			environment.addActiveProfile(FredBetProfile.FONGO);
		}

		LOG.info("Active profiles: " + Arrays.asList(environment.getActiveProfiles()));
	}

}

@@ -808,18 +808,16 @@
 DEV)) %7B%0A
-//
 %09%09%09envir
@@ -870,10 +870,8 @@
 A);%0A
-//
 %09%09%09e

reset dev profile setting