@Bean public ServletRegistrationBean fhirServerRegistrationBean() { ServletRegistrationBean registration = new ServletRegistrationBean(this, this.properties.getServer().getPath()); registration.setLoadOnStartup(1); return registration; }
@Configuration @EnableWs @ImportResource("classpath:/applicationContext.xml") public class WebServiceConfiguration extends WsConfigurerAdapter { @Bean public ServletRegistrationBean wsServlet(){ ServletRegistrationBean wsServletBean = new ServletRegistrationBean(new WSSpringServlet(), "/services/*"); wsServletBean.setLoadOnStartup(1); //wsServletBean.setInitParameters(initParameters); return wsServletBean; } }
@Bean public ServletRegistrationBean repositoryServletRegistrationBean( RepositoryHttpServlet repositoryHttpServlet) { ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(repositoryHttpServlet, "/repository_servlet/*"); servletRegistrationBean.setLoadOnStartup(1); return servletRegistrationBean; }
@Bean public ServletRegistrationBean readHitchEventServletBean(ApplicationContext applicationContext) { ServletRegistrationBean readHitchEventServletBean = new ServletRegistrationBean(); readHitchEventServletBean.setServlet(new ReadHitchEventServlet(applicationContext)); readHitchEventServletBean.setLoadOnStartup(5); return readHitchEventServletBean; }
@Bean public ServletRegistrationBean readHitchEventServletBean(Heheda heheda) { ServletRegistrationBean readHitchEventServletBean = new ServletRegistrationBean(); readHitchEventServletBean.setServlet(new ReadHitchEventServlet(heheda)); readHitchEventServletBean.setLoadOnStartup(5); return readHitchEventServletBean; }
@Bean public ServletRegistrationBean facesServletRegistration() { ServletRegistrationBean registration = new ServletRegistrationBean(new FacesServlet(), "*.htm"); registration.setLoadOnStartup(1); return registration; }
@Bean public ServletRegistrationBean myServlet(){ ServletRegistrationBean registrationBean = new ServletRegistrationBean(new MyServlet(),"/myServlet"); registrationBean.setLoadOnStartup(1); return registrationBean; }
@Bean public ServletRegistrationBean themeServlet(ThemeResolver themeResolver, ThemeSource themeSource, ThemeCompiler themeCompiler) { ServletRegistrationBean registration = new ServletRegistrationBean(); registration.setServlet(new ThemeServlet(themeResolver, themeSource, themeCompiler)); registration.setUrlMappings(Lists.newArrayList(BLOSSOM_THEME_SCSS_SERVLET, BLOSSOM_THEME_MAIL_SCSS_SERVLET)); registration.setLoadOnStartup(1); return registration; }
@Bean public ServletRegistrationBean getServlet() { HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet(); ServletRegistrationBean<HystrixMetricsStreamServlet> registrationBean = new ServletRegistrationBean<>(streamServlet); registrationBean.setLoadOnStartup(1); registrationBean.addUrlMappings("/hystrix.stream"); registrationBean.setName("HystrixMetricsStreamServlet"); return registrationBean; } }
@Bean ServletRegistrationBean camelServlet() { // use a @Bean to register the Camel servlet which we need to do // because we want to use the camel-servlet component for the Camel REST service ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setName("CamelServlet"); mapping.setLoadOnStartup(1); mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings("/camel/*"); return mapping; }
@Bean public ServletRegistrationBean servletRegistrationBean() { ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings("/webhook/*"); mapping.setName("CamelServlet"); mapping.setLoadOnStartup(1); return mapping; }
@Bean ServletRegistrationBean camelServlet() { // TODO: Camel 2.19 should support this OOTB // use a @Bean to register the Camel servlet which we need to do // because we want to use the camel-servlet component for the Camel REST service ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setName("CamelServlet"); mapping.setLoadOnStartup(1); // CamelHttpTransportServlet is the name of the Camel servlet to use mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings("/api/*"); return mapping; }
@Bean public ServletRegistrationBean dispatcherServletRegistration() { DispatcherServlet dispatcherServlet = dispatcherServlet(); ServletRegistrationBean registration = new ServletRegistrationBean(); registration.setName(DispatcherServletAutoConfiguration.DEFAULT_DISPATCHER_SERVLET_BEAN_NAME); registration.setServlet(dispatcherServlet); // registration.addInitParameter("contextConfigLocation", "classpath:spring-mvc.xml"); registration.addInitParameter("contextConfigLocation", MvcAdvanceConfig.class.getName()); registration.setLoadOnStartup(1); registration.setAsyncSupported(true); registration.addUrlMappings("/", "*.do"); return registration; }
@Bean ServletRegistrationBean camelServlet() { // use a @Bean to register the Camel servlet which we need to do // because we want to use the camel-servlet component for the Camel REST service ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setName("CamelServlet"); mapping.setLoadOnStartup(1); // CamelHttpTransportServlet is the name of the Camel servlet to use mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings("/camel/*"); return mapping; }
@Bean ServletRegistrationBean servletRegistrationBean(ServletMappingConfiguration config) { ServletRegistrationBean mapping = new ServletRegistrationBean(); mapping.setServlet(new CamelHttpTransportServlet()); mapping.addUrlMappings(config.getContextPath()); mapping.setName(config.getServletName()); mapping.setLoadOnStartup(1); return mapping; }
@Bean public ServletRegistrationBean springLoggingSupportWebServlet() { AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext(); applicationContext.register(LoggingConfig.class); DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(applicationContext); ServletRegistrationBean registrationBean = new ServletRegistrationBean(dispatcherServlet, getServletMapping()); registrationBean.setName(getServletName()); registrationBean.setLoadOnStartup(1); return registrationBean; }
@Bean public ServletRegistrationBean publicJersey() { ServletRegistrationBean publicJersey = new ServletRegistrationBean(new ServletContainer(new RestPublicConfiguration())); publicJersey.addUrlMappings("/" + RestPaths.PUBLIC_REST + "/*"); publicJersey.setName("RestPublic"); publicJersey.setLoadOnStartup(0); return publicJersey; }
@Bean public ServletRegistrationBean springBatchSupportServlet() { AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext(); applicationContext.register(SpringBatchSupportWebServletConfig.class); DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(applicationContext); ServletRegistrationBean registrationBean = new ServletRegistrationBean(dispatcherServlet, getServletMapping()); registrationBean.setName(getServletName()); registrationBean.setLoadOnStartup(1); return registrationBean; }
@Bean public ServletRegistrationBean privateJersey() { ServletRegistrationBean privateJersey = new ServletRegistrationBean(new ServletContainer(new RestPrivateConfiguration())); privateJersey.addUrlMappings("/" + RestPaths.REST + "/*"); privateJersey.setName("RestPrivate"); privateJersey.setLoadOnStartup(0); return privateJersey; }
@Bean public ServletRegistrationBean configurationServlet() { AnnotationConfigWebApplicationContext applicationContext = new AnnotationConfigWebApplicationContext(); applicationContext.register(ConfigServletConfig.class); DispatcherServlet dispatcherServlet = new DispatcherServlet(); dispatcherServlet.setApplicationContext(applicationContext); ServletRegistrationBean registrationBean = new ServletRegistrationBean(dispatcherServlet, namicsConfigurationProperties.getWeb() .getServletMapping()); registrationBean.setName(namicsConfigurationProperties.getWeb().getServletName()); registrationBean.setLoadOnStartup(1); return registrationBean; }