johanhaleby / occurrent

Unintrusive Event Sourcing Library for the JVM
https://occurrent.org
120 stars 16 forks source link

spring-boot-starter: support for Spring Boot 3.x #128

Closed gavvvr closed 1 year ago

gavvvr commented 1 year ago

Solution for #127

Spring Boot 2.7 release notes say:

... you should move the registration from spring.factories under the org.springframework.boot.autoconfigure.EnableAutoConfiguration key to a new file named META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

For backwards compatibility, entries in spring.factories will still be honored.

I did not touch the version of Spring Boot in occurrent repo and left spring.factories as is to preserve compatibility with Spring Boot 2.x. I've just added the META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports required by Spring Boot 3.x.

How did I make sure this solution should be enough For Spring Boot 3.0.0? In my project using occurrent I've just created a gradle module with a wrapper-starter containing just 2 files:

├── build.gradle.kts
└── src
    └── main
        └── resources
            └── META-INF
                └── spring
                    └── org.springframework.boot.autoconfigure.AutoConfiguration.imports

That was enough to make this starter to work with Spring Boot 3.0.0

johanhaleby commented 1 year ago

Thanks a lot for your PR! I've had on my todo to look into this, so thank you for fixing it ahead of time :) Really appreciated.

If you have any other comments or feedback, I'd love to know :)

gavvvr commented 1 year ago

@johanhaleby I would like to know where is the source code for the documentation page

johanhaleby commented 1 year ago

@gavvvr You can find it here: https://github.com/occurrent-org/occurrent-org.github.io

gavvvr commented 1 year ago

@johanhaleby thanks! I've read it from top to bottom and will propose some fixes. Weird, that I was unable to google the doc's repo 😬

johanhaleby commented 1 year ago

That's awesome, thanks :)

gavvvr commented 1 year ago

@johanhaleby could you please make a release? Without a release I can't get rid of my own wrapper starter which adds the org.springframework.boot.autoconfigure.AutoConfiguration.imports

johanhaleby commented 1 year ago

I'll create a new release right away.

gavvvr commented 1 year ago

Hi @johanhaleby . I see the occurrent-0.15.1 tag and CI pipelines for it were successful, but for some reasons I still can't see 0.15.1 on Maven Central

johanhaleby commented 1 year ago

@gavvvr It should be there, see https://search.maven.org/artifact/org.occurrent/occurrent/0.15.1/pom. It usually take some time before a release is shown on the website, but it's still there.