org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration Java Examples
The following examples show how to use
org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebGuestComponentScanRegistrar.java From wallride with Apache License 2.0 | 5 votes |
@Override public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_BEAN_NAME.equals(beanName)) { DispatcherServlet dispatcherServlet = (DispatcherServlet) bean; AnnotationConfigServletWebServerApplicationContext context = (AnnotationConfigServletWebServerApplicationContext) dispatcherServlet.getWebApplicationContext(); context.scan(packagesToScan); this.processed = true; } return bean; }
Example #2
Source File: WallRideServletConfiguration.java From wallride with Apache License 2.0 | 5 votes |
@Bean(name = DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_BEAN_NAME) public DispatcherServlet guestDispatcherServlet() { AnnotationConfigServletWebServerApplicationContext context = new AnnotationConfigServletWebServerApplicationContext(); context.setResourceLoader(getResourceLoader()); context.register(WebGuestConfiguration.class); WallRideDispatcherServlet dispatcherServlet = new WallRideDispatcherServlet(context); dispatcherServlet.setDetectParentHandlerMappings(true); return dispatcherServlet; }
Example #3
Source File: WallRideServletConfiguration.java From wallride with Apache License 2.0 | 5 votes |
@Bean(name = DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME) public DispatcherServletRegistrationBean guestServletRegistrationBean(DispatcherServlet dispatcherServlet) { DispatcherServletRegistrationBean registration = new DispatcherServletRegistrationBean(dispatcherServlet, GUEST_SERVLET_PATH + "/*"); registration.setName(GUEST_SERVLET_NAME); registration.setLoadOnStartup(1); return registration; }