Search in sources :

Example 1 with CamelHttpTransportServlet

use of org.apache.camel.component.servlet.CamelHttpTransportServlet in project camel by apache.

the class Application method servletRegistrationBean.

@Bean
ServletRegistrationBean servletRegistrationBean() {
    ServletRegistrationBean servlet = new ServletRegistrationBean(new CamelHttpTransportServlet(), "/camel-rest-jpa/*");
    servlet.setName("CamelServlet");
    return servlet;
}
Also used : ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) CamelHttpTransportServlet(org.apache.camel.component.servlet.CamelHttpTransportServlet) ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Example 2 with CamelHttpTransportServlet

use of org.apache.camel.component.servlet.CamelHttpTransportServlet in project camel by apache.

the class ServletMappingAutoConfiguration method servletRegistrationBean.

@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;
}
Also used : ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) CamelHttpTransportServlet(org.apache.camel.component.servlet.CamelHttpTransportServlet) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Example 3 with CamelHttpTransportServlet

use of org.apache.camel.component.servlet.CamelHttpTransportServlet in project camel by apache.

the class Application method camelServletRegistrationBean.

@Bean
public ServletRegistrationBean camelServletRegistrationBean() {
    ServletRegistrationBean registration = new ServletRegistrationBean(new CamelHttpTransportServlet(), "/camel/*");
    registration.setName("CamelServlet");
    return registration;
}
Also used : ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) CamelHttpTransportServlet(org.apache.camel.component.servlet.CamelHttpTransportServlet) ServletRegistrationBean(org.springframework.boot.web.servlet.ServletRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

CamelHttpTransportServlet (org.apache.camel.component.servlet.CamelHttpTransportServlet)3 ServletRegistrationBean (org.springframework.boot.web.servlet.ServletRegistrationBean)3 Bean (org.springframework.context.annotation.Bean)3 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1