Advertisement
Guest User

Untitled

a guest
Jul 16th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement