Open cer opened 1 year ago
@kwonglau Isn't the solution to simply have both files: spring.factories
and org.springframework.boot.autoconfigure.AutoConfiguration.imports
?
yes.
auto configuration issue is an easy fix.
The configuration class in org.springframework.boot.autoconfigure.AutoConfiguration.imports
has to mark as @AutoConfiguration
instead of @Configuration
. Otherwise; it will not pick up in spring boot 3.
the annotation exists since 2.7.
The configuration class in
org.springframework.boot.autoconfigure.AutoConfiguration.imports
has to mark as@AutoConfiguration
instead of@Configuration
. Otherwise; it will not pick up in spring boot 3.
Are you saying that auto configuration of Eventuate applications is not working because of this problem?
One possibility is to update the framework to require 2.7. That's currently the only (non-commercial) supported 2.x version
Correct. The auto config class doesn’t pick up in spring 3.1.1 unless I use the new annotation.
Correct. The auto config class doesn’t pick up in spring 3.1.1 unless I use the new annotation.
I just tried an example (which uses autoconfiguration via the eventuate starters) with 3.1.2 and the build worked (locally): See https://github.com/eventuate-tram/eventuate-tram-sagas-examples-customers-and-orders/commit/3706088b4601101c0d92f3df3373179940ff34e1
There also this open Spring Boot issue: https://github.com/spring-projects/spring-boot/issues/35044
Very strange. I had an autoconfiguration failure on a really small (private) project. I fixed it by changing Tram to use @AutoConfiguration.
I think the behavior is unpredictable. I recall that it was working when I was testing it with spring boot 3.0.1 back in January and it didn’t work when I was testing with spring boot 3.1.1 a few days ago.
Originally posted by @cer in https://github.com/eventuate-foundation/eventuate-common/issues/129#issuecomment-1376265993
/cc @kwonglau