SHOW:
|
|
- or go back to the newest paste.
1 | public class WebApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { | |
2 | ||
3 | /** | |
4 | * Override the default creation of the servlet application context to | |
5 | * configure additional parameters. | |
6 | * | |
7 | * @return | |
8 | */ | |
9 | @Override | |
10 | protected WebApplicationContext createServletApplicationContext() { | |
11 | AnnotationConfigWebApplicationContext webApplicationContext = (AnnotationConfigWebApplicationContext) super.createServletApplicationContext(); | |
12 | webApplicationContext.getEnvironment().addActiveProfile(SpringConfigurationProfile.WEBAPP.name()); | |
13 | return webApplicationContext; | |
14 | } |