List of usage examples for org.springframework.boot.web.servlet ServletRegistrationBean addUrlMappings
public void addUrlMappings(String... urlMappings)
From source file:com.loy.ServiceAuthApplicationMain.java
@Bean public ServletRegistrationBean h2servletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(new WebServlet()); registration.addUrlMappings("/console/*"); return registration; }
From source file:com.loy.SingleApplicationMain.java
@Bean ServletRegistrationBean h2servletRegistration() { ServletRegistrationBean registrationBean = new ServletRegistrationBean(new WebServlet()); registrationBean.addUrlMappings("/console/*"); return registrationBean; }
From source file:com.voxxed.bigdata.web.WebApp.java
/** * Bind the Camel servlet at the "/api" context path. *///from www. ja v a2 s . co m @Bean ServletRegistrationBean servletRegistrationBean() { ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings("/api/*"); mapping.setName("CamelServlet"); mapping.setLoadOnStartup(1); return mapping; }
From source file:com.meals.on.wheels.MealsOnWheelsApplication.java
@Bean public ServletRegistrationBean h2servletRegistration() { ServletRegistrationBean registrationBean = new ServletRegistrationBean(new WebServlet()); registrationBean.addUrlMappings("/console/*"); return registrationBean; }
From source file:com.create.application.configuration.H2Configuration.java
@Bean public ServletRegistrationBean h2servletRegistration( @Value("${spring.h2.console.path}") String h2ConsoleContextPath) { WebServlet webServlet = new WebServlet(); ServletRegistrationBean bean = new ServletRegistrationBean(webServlet); String h2ConsoleMappings = getH2ConsoleMappings(h2ConsoleContextPath); bean.addUrlMappings(h2ConsoleMappings); return bean;/*from w ww . j a v a 2s .c o m*/ }
From source file:org.joinfaces.richfaces.RichfacesSpringBootAutoConfiguration.java
@Bean public ServletRegistrationBean richfacesResourcesServlet() { ServletRegistrationBean result = new ServletRegistrationBean(); result.setServlet(new ResourceServlet()); result.setLoadOnStartup(1);/*from w ww. j a va2s. c om*/ result.addUrlMappings("/org.richfaces.resources/*"); return result; }
From source file:de.dlopes.stocks.facilitator.config.JsfMvcConfig.java
/** * Register the JSF's Faces servlet/*www .j a v a2 s . c o m*/ * * Hint: this is needed for proper initialization of JSF * * @return a ServletRegistrationBean containing the FacesServlet */ @Bean public ServletRegistrationBean facesServletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet()); registration.setLoadOnStartup(1); registration.addUrlMappings("*.faces"); return registration; }
From source file:com.evolveum.midpoint.web.boot.MidPointSpringApplication.java
@Bean public ServletRegistrationBean reportPeerQueryInterceptor() { ServletRegistrationBean registration = new ServletRegistrationBean(); registration.setServlet(new ReportPeerQueryInterceptor(nodeAuthenticator)); registration.addUrlMappings("/report"); return registration; }
From source file:de.dlopes.stocks.facilitator.config.JsfMvcConfig.java
/** * Register the Spring MVC dispatcher servlet under the context path '/app/*' * /* www. j av a 2 s .c o m*/ * hint: we need to do this otherwise there will be an overlap with JSF's * FacesServlet * * @return a ServletRegistrationBean containing the DispatcherServlet and it's * mapping */ @Bean public ServletRegistrationBean dispatcherServletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(dispatcherServlet()); registration.setLoadOnStartup(1); registration.setName(DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_REGISTRATION_BEAN_NAME); registration.addUrlMappings(config.getDispatcherServletCxtpth() + "/*"); return registration; }
From source file:com.evolveum.midpoint.web.boot.MidPointSpringApplication.java
@Bean public ServletRegistrationBean staticWebServlet() { ServletRegistrationBean registration = new ServletRegistrationBean(); StaticWebServlet servlet = new StaticWebServlet( new File(startupConfiguration.getMidpointHome(), "static-web")); registration.setServlet(servlet);//from ww w . j av a2 s.com registration.addUrlMappings("/static-web/*"); return registration; }