Java Code Examples for org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#setResourceLoader()
The following examples show how to use
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#setResourceLoader() .
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: 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 2
Source File: WallRideServletConfiguration.java From wallride with Apache License 2.0 | 5 votes |
@Bean public DispatcherServlet adminDispatcherServlet() { AnnotationConfigServletWebServerApplicationContext context = new AnnotationConfigServletWebServerApplicationContext(); context.setResourceLoader(getResourceLoader()); context.register(WebAdminConfiguration.class); WallRideDispatcherServlet dispatcherServlet = new WallRideDispatcherServlet(context); return dispatcherServlet; }