public class Spring {
private static AnnotationConfigApplicationContext context = null;
public static void initialize() throws IOException {
context = new AnnotationConfigApplicationContext();
ConfigurableEnvironment environment = context.getEnvironment();
environment.addActiveProfile("cryson_logging");
PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer();
configurer.setLocations(new Resource[]{context.getResource("advancedcrysondiary.properties"), context.getResource("cryson.properties")});
context.addBeanFactoryPostProcessor(configurer);