This is an automated email from the ASF dual-hosted git repository.
fmariani pushed a commit to branch camel-spring-boot-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/camel-spring-boot-4.18.x by
this push:
new a7807055950 ci: fix Spring Security config in platform-http tests for
4.18.x
a7807055950 is described below
commit a78070559506793ed748954d975e3cff60367945
Author: Croway <[email protected]>
AuthorDate: Fri Apr 17 10:30:51 2026 +0200
ci: fix Spring Security config in platform-http tests for 4.18.x
---
.../http/springboot/SpringBootPlatformHttpTest.java | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpTest.java
b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpTest.java
index b69cf6ddf0e..118c077736d 100644
---
a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpTest.java
+++
b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpTest.java
@@ -20,13 +20,13 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.spring.boot.CamelAutoConfiguration;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import
org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientAutoConfiguration;
-import
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import
org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.web.SecurityFilterChain;
-@EnableAutoConfiguration(exclude = {OAuth2ClientAutoConfiguration.class,
SecurityAutoConfiguration.class})
+@EnableAutoConfiguration
@CamelSpringBootTest
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
classes = { CamelAutoConfiguration.class,
SpringBootPlatformHttpTest.class,
SpringBootPlatformHttpTest.TestConfiguration.class,
@@ -43,6 +43,13 @@ public class SpringBootPlatformHttpTest extends
PlatformHttpBase {
@Configuration
public static class TestConfiguration {
+ @Bean
+ public SecurityFilterChain securityFilterChain(HttpSecurity http)
throws Exception {
+ http.authorizeHttpRequests(auth -> auth.anyRequest().permitAll())
+ .csrf(csrf -> csrf.disable());
+ return http.build();
+ }
+
@Bean
public RouteBuilder servletPlatformHttpRouteBuilder() {
return new RouteBuilder() {