WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); String profile = wac.getEnvironment().getActiveProfiles()[0];
WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); String profile = wac.getEnvironment().getActiveProfiles()[0];