diff --git a/messaging-modules/spring-apache-camel/README.md b/messaging-modules/spring-apache-camel/README.md
index 66079d4e83..d77befc328 100644
--- a/messaging-modules/spring-apache-camel/README.md
+++ b/messaging-modules/spring-apache-camel/README.md
@@ -14,7 +14,7 @@ This module contains articles about Spring with Apache Camel
### Framework Versions:
- Spring 5.3.25
-- Apache Camel 3.14.7
+- Apache Camel 3.21.0
### Build and Run Application
diff --git a/messaging-modules/spring-apache-camel/pom.xml b/messaging-modules/spring-apache-camel/pom.xml
index c64d84efdc..ba2054b182 100644
--- a/messaging-modules/spring-apache-camel/pom.xml
+++ b/messaging-modules/spring-apache-camel/pom.xml
@@ -19,12 +19,12 @@
org.apache.camel
camel-core
- ${env.camel.version}
+ ${camel.version}
org.apache.camel
camel-spring
- ${env.camel.version}
+ ${camel.version}
commons-logging
@@ -35,17 +35,12 @@
org.apache.camel
camel-stream
- ${env.camel.version}
+ ${camel.version}
org.springframework
spring-context
- ${env.spring.version}
-
-
- org.apache.camel
- camel-spring-javaconfig
- ${env.camel.version}
+ ${spring.version}
org.apache.camel.springboot
@@ -77,12 +72,16 @@
${camel.version}
test
+
+ org.apache.camel
+ camel-spring-xml
+ ${camel.version}
+
- 3.14.7
- 5.3.25
- 3.15.0
+ 5.3.25
+ 3.21.0
diff --git a/messaging-modules/spring-apache-camel/src/main/java/com/baeldung/camel/apache/file/cfg/ContentBasedFileRouterConfig.java b/messaging-modules/spring-apache-camel/src/main/java/com/baeldung/camel/apache/file/cfg/ContentBasedFileRouterConfig.java
index 2b24cf2a51..208a3dd5cd 100644
--- a/messaging-modules/spring-apache-camel/src/main/java/com/baeldung/camel/apache/file/cfg/ContentBasedFileRouterConfig.java
+++ b/messaging-modules/spring-apache-camel/src/main/java/com/baeldung/camel/apache/file/cfg/ContentBasedFileRouterConfig.java
@@ -1,26 +1,24 @@
package com.baeldung.camel.apache.file.cfg;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.spring.javaconfig.CamelConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.baeldung.camel.apache.file.ContentBasedFileRouter;
@Configuration
-public class ContentBasedFileRouterConfig extends CamelConfiguration {
+public class ContentBasedFileRouterConfig {
@Bean
ContentBasedFileRouter getContentBasedFileRouter() {
return new ContentBasedFileRouter();
}
- @Override
public List routes() {
- return Arrays.asList(getContentBasedFileRouter());
+ return Collections.singletonList(getContentBasedFileRouter());
}
}