This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-19510/fix-auto-configuration
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git

commit 6a611e5c7313879280895371b292d5da2721f0c9
Author: Nicolas Filotto <[email protected]>
AuthorDate: Tue Jun 27 17:49:01 2023 +0200

    CAMEL-19510: reactive-streams - Fix the auto configuration
---
 amqp/src/main/java/sample/camel/SampleAmqApplication.java   |  2 --
 .../src/main/java/sample/camel/SampleAmqApplication.java    |  2 --
 .../apache/camel/example/reactive/streams/RestExample.java  |  4 ++--
 ...gframework.boot.autoconfigure.AutoConfiguration.imports} | 13 ++++++-------
 4 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/amqp/src/main/java/sample/camel/SampleAmqApplication.java 
b/amqp/src/main/java/sample/camel/SampleAmqApplication.java
index bd7b327..6890811 100644
--- a/amqp/src/main/java/sample/camel/SampleAmqApplication.java
+++ b/amqp/src/main/java/sample/camel/SampleAmqApplication.java
@@ -17,12 +17,10 @@
 package sample.camel;
 
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 //CHECKSTYLE:OFF
 @SpringBootApplication
-@EnableAutoConfiguration
 public class SampleAmqApplication {
 
     public static void main(String[] args) {
diff --git a/artemis/src/main/java/sample/camel/SampleAmqApplication.java 
b/artemis/src/main/java/sample/camel/SampleAmqApplication.java
index fe312d6..3c5df03 100644
--- a/artemis/src/main/java/sample/camel/SampleAmqApplication.java
+++ b/artemis/src/main/java/sample/camel/SampleAmqApplication.java
@@ -17,12 +17,10 @@
 package sample.camel;
 
 import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 //CHECKSTYLE:OFF
 @SpringBootApplication
-@EnableAutoConfiguration
 public class SampleAmqApplication {
     public static void main(String[] args) {
         SpringApplication.run(SampleAmqApplication.class, args);
diff --git 
a/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
 
b/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
index 4f6dc0c..ebd72e6 100644
--- 
a/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
+++ 
b/reactive-streams/src/main/java/org/apache/camel/example/reactive/streams/RestExample.java
@@ -70,8 +70,8 @@ public class RestExample {
                     .to("direct:sum");
 
             from("direct:sum")
-                    .setHeader("num1").simple("headerAs(num1,Long)")
-                    .setHeader("num2").simple("headerAs(num2,Long)")
+                    .setHeader("num1").simple("${headerAs(num1,Long)}")
+                    .setHeader("num2").simple("${headerAs(num2,Long)}")
                     .bean("calculator", "sum")
                     .process(new UnwrapStreamProcessor())
                     .setBody().simple("The result is: ${body}");
diff --git a/reactive-streams/src/main/resources/META-INF/spring.factories 
b/reactive-streams/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
similarity index 90%
rename from reactive-streams/src/main/resources/META-INF/spring.factories
rename to 
reactive-streams/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
index 18f67dc..637f75f 100644
--- a/reactive-streams/src/main/resources/META-INF/spring.factories
+++ 
b/reactive-streams/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -31,12 +31,11 @@
 # limitations under the License.
 #
 
-org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
-org.apache.camel.example.reactive.streams.BasicCamelToReactorExample,\
-org.apache.camel.example.reactive.streams.BasicReactorToCamelExample,\
-org.apache.camel.example.reactive.streams.BasicReactorToCamelInOutExample,\
-org.apache.camel.example.reactive.streams.BasicCamelToReactorInOutExample,\
-org.apache.camel.example.reactive.streams.RestExample,\
-org.apache.camel.example.reactive.streams.ClientAPIRestExample,\
+org.apache.camel.example.reactive.streams.BasicCamelToReactorExample
+org.apache.camel.example.reactive.streams.BasicReactorToCamelExample
+org.apache.camel.example.reactive.streams.BasicReactorToCamelInOutExample
+org.apache.camel.example.reactive.streams.BasicCamelToReactorInOutExample
+org.apache.camel.example.reactive.streams.RestExample
+org.apache.camel.example.reactive.streams.ClientAPIRestExample
 org.apache.camel.example.reactive.streams.ClientAPIWorkflowExample
 

Reply via email to