SHARE
TWEET

Untitled

a guest Jul 20th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MyWebApplicationInitializer implements WebApplicationInitializer {
  2.  
  3. @Override
  4. public void onStartup(ServletContext servletCxt) {
  5.  
  6.     // Load Spring web application configuration
  7.     AnnotationConfigWebApplicationContext ac = new AnnotationConfigWebApplicationContext();
  8.     ac.register(AppConfig.class);
  9.     ac.refresh();
  10.  
  11.     // Create and register the DispatcherServlet
  12.     DispatcherServlet servlet = new DispatcherServlet(ac);
  13.     ServletRegistration.Dynamic registration = servletCxt.addServlet("app", servlet);
  14.     registration.setLoadOnStartup(1);
  15.     registration.addMapping("/app/*");
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top