This is an automated email from the ASF dual-hosted git repository. nfilotto pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot-examples.git
The following commit(s) were added to refs/heads/main by this push: new 8584e4e CAMEL-19510: reactive-streams - Fix the auto configuration (#113) 8584e4e is described below commit 8584e4e7fc4c40bd467366f2970c423ce0cb0ba9 Author: Nicolas Filotto <essob...@users.noreply.github.com> AuthorDate: Tue Jun 27 18:01:26 2023 +0200 CAMEL-19510: reactive-streams - Fix the auto configuration (#113) ## Motivation No routes are even started ## Modifications * Fixes the simple expression * The way [to register auto-configurations has changed](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#auto-configuration-files), the code must be changed consequently * Removes unnecessary annotation `EnableAutoConfiguration` as it is already included `SpringBootApplication` --- 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