Package org.springframework.boot.context.embedded

Examples of org.springframework.boot.context.embedded.ServletRegistrationBean


    protected ServletRegistrationBean createServletRegistrationBean() {
        getLogger().info("Registering servlet of type [{}]", getServletClass().getCanonicalName());
        final String urlMapping = getUrlMapping();
        getLogger().info("Servlet will be mapped to URL [{}]", urlMapping);
        final HttpServlet servlet = createServlet();
        final ServletRegistrationBean registrationBean = new ServletRegistrationBean(
                servlet, urlMapping);
        addInitParameters(registrationBean);
        return registrationBean;
    }
View Full Code Here


    @Bean
    public ServletRegistrationBean jerseyServlet() {
        ServletContainer servletContainer = new ServletContainer(jerseyConfig());
        String prefix = applicationProperties.getPrefix();
        ServletRegistrationBean bean = new ServletRegistrationBean(servletContainer, toUrlMapping(prefix));
        bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
        return bean;
    }
View Full Code Here

public class GenericTestProxyContainer {
    private static final Logger logger = LoggerFactory.getLogger(GenericTestProxyContainer.class);

    @Bean
    public ServletRegistrationBean dispatcherRegistration() {
        ServletRegistrationBean registration = new ServletRegistrationBean(new TestHandler());
        registration.addUrlMappings("/*");

        return registration;
    }
View Full Code Here

class GenericProxyContainer {
    private static final Logger logger = LoggerFactory.getLogger(GenericProxyContainer.class);

    @Bean
    public ServletRegistrationBean dispatcherRegistration() {
        ServletRegistrationBean registration = new ServletRegistrationBean(new Proxy());
        registration.addUrlMappings("/*");

        return registration;
    }
View Full Code Here

    throw new IllegalStateException("Call Para.initialize() first!");
  }

  @Bean
  public ServletRegistrationBean jerseyRegistrationBean() {
    ServletRegistrationBean reg = new ServletRegistrationBean(
        new ServletContainer(new Api1()), Api1.PATH + "*");
    reg.setName(Api1.class.getSimpleName());
    reg.setAsyncSupported(true);
    reg.setEnabled(true);
    reg.setOrder(1);
    return reg;
  }
View Full Code Here

    start();
  }

  @Bean
  public ServletRegistrationBean repositoryServletRegistrationBean() {
    ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(new RepositoryHttpServlet(),
        "/repository_servlet/*");
    servletRegistrationBean.setLoadOnStartup(1);
    return servletRegistrationBean;
  }
View Full Code Here

    }

    @Bean
    @Profile(SaganProfiles.STANDALONE)
    public ServletRegistrationBean h2Console() {
        ServletRegistrationBean reg = new ServletRegistrationBean(new WebServlet(), "/console/*");
        reg.setLoadOnStartup(1);
        return reg;
    }
View Full Code Here

    throw new IllegalStateException("Call Para.initialize() first!");
  }

  @Bean
  public ServletRegistrationBean jerseyRegistrationBean() {
    ServletRegistrationBean reg = new ServletRegistrationBean(
        new ServletContainer(new Api1()), Api1.PATH + "*");
    reg.setName(Api1.class.getSimpleName());
    return reg;
  }
View Full Code Here

        return application.sources(entryPointClass);
    }

    @Bean
    public ServletRegistrationBean jerseyServlet() {
        ServletRegistrationBean registration = new ServletRegistrationBean(new ServletContainer(), "/*");
        registration.addInitParameter(ServletProperties.JAXRS_APPLICATION_CLASS, JaxRsApplication.class.getName());
        return registration;
    }
View Full Code Here

    throw new IllegalStateException("Call Para.initialize() first!");
  }

  @Bean
  public ServletRegistrationBean jerseyRegistrationBean() {
    ServletRegistrationBean reg = new ServletRegistrationBean(
        new ServletContainer(new Api1()), Api1.PATH + "*");
    reg.setName(Api1.class.getSimpleName());
    return reg;
  }
View Full Code Here

TOP

Related Classes of org.springframework.boot.context.embedded.ServletRegistrationBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.