johanhaleby / occurrent

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

Spring Boot starter is not compatible with Spring Boot 3.0 #127

Closed gavvvr closed 1 year ago

gavvvr commented 1 year ago

With a Spring Boot 3.0 the app will fail to start up with the following error:

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.occurrent.springboot.mongo.blocking.OccurrentProperties' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
    at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1812)
    at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1371)
    at app//org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1325)
    at app//org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:880)
    at app//org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:784)

The reason for that is because Spring Boot 3.0 does not take spring.factories into consideration anymore