This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push: new dd1a0ae47b5 Add servlet-starter dependency (#623) dd1a0ae47b5 is described below commit dd1a0ae47b59ac84c827b11906420e5268d27a85 Author: Federico Mariani <34543311+cro...@users.noreply.github.com> AuthorDate: Tue Sep 6 19:36:21 2022 +0200 Add servlet-starter dependency (#623) --- components-starter/camel-platform-http-starter/pom.xml | 7 +------ .../http/springboot/ServletPlatformHttpAutoConfiguration.java | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/components-starter/camel-platform-http-starter/pom.xml b/components-starter/camel-platform-http-starter/pom.xml index ae5c0519b22..7f96c0ffc23 100644 --- a/components-starter/camel-platform-http-starter/pom.xml +++ b/components-starter/camel-platform-http-starter/pom.xml @@ -39,15 +39,10 @@ <artifactId>camel-platform-http</artifactId> <version>${camel-version}</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-servlet</artifactId> - <version>${camel-version}</version> - </dependency> <dependency> <groupId>org.apache.camel.springboot</groupId> <artifactId>camel-servlet-starter</artifactId> - <scope>test</scope> + <version>${project.version}</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> diff --git a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/ServletPlatformHttpAutoConfiguration.java b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/ServletPlatformHttpAutoConfiguration.java index 5dade1ad60c..7d28d3ccd38 100644 --- a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/ServletPlatformHttpAutoConfiguration.java +++ b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/ServletPlatformHttpAutoConfiguration.java @@ -21,7 +21,6 @@ import org.apache.camel.component.platform.http.spi.PlatformHttpEngine; import org.apache.camel.component.servlet.ServletComponent; import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -29,7 +28,6 @@ import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.Lazy; @Configuration(proxyBeanMethods = false) -@ConditionalOnBean(type = "org.apache.camel.component.servlet.springboot.ServletComponentAutoConfiguration") @AutoConfigureAfter(name = { "org.apache.camel.component.servlet.springboot.ServletComponentAutoConfiguration", "org.apache.camel.component.servlet.springboot.ServletComponentConverter"}) @@ -47,6 +45,6 @@ public class ServletPlatformHttpAutoConfiguration { @ConditionalOnMissingBean(PlatformHttpEngine.class) @DependsOn("configureServletComponent") public PlatformHttpEngine servletPlatformHttpEngine() { - return new ServletPlatformHttpEngine((ServletComponent) camelContext.getComponent("servlet")); + return new ServletPlatformHttpEngine(camelContext.getComponent("servlet", ServletComponent.class)); } }