Guest User

Untitled

a guest
Jan 24th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. final AnnotationConfigEmbeddedWebApplicationContext childContext = new AnnotationConfigEmbeddedWebApplicationContext();
  2. childContext.setParent(this.applicationContext);
  3. childContext.setId(this.applicationContext.getId() + ":one");
  4.  
  5. childContext.register(
  6. PropertyPlaceholderAutoConfiguration.class,
  7. EmbeddedServletContainerAutoConfiguration.class,
  8. DispatcherServletAutoConfiguration.class);
  9.  
  10. childContext.scan("com.patsnap.serviceOne");
  11.  
  12. ConfigFileApplicationListener listener = new ConfigFileApplicationListener();
  13. childContext.addApplicationListener(listener);
  14.  
  15. childContext.refresh();
Add Comment
Please, Sign In to add comment