Spring 获取当前activeProfile
WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); String profile = wac.getEnvironment().getActiveProfiles()[0];
WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext()); String profile = wac.getEnvironment().getActiveProfiles()[0];