Skip to content

Support for Spring Boot 4 #628

@spartanhooah

Description

@spartanhooah

Describe the problem you'd like to have solved

This library is currently incompatible with Spring Boot 4.

Project where the issue occurs: https://github.com/spartanhooah/sdjpa-intro/tree/spring-boot-4

Stack trace:

java.lang.IllegalStateException: Failed to generate bean name for imported class 'dev.akkinoc.spring.boot.logback.access.LogbackAccessAutoConfiguration'
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.registerBeanDefinitionForImportedConfigurationClass(ConfigurationClassBeanDefinitionReader.java:172) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:145) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:454) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:306) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:784) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:602) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-web-server-4.0.0-RC2.jar:4.0.0-RC2]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:765) ~[spring-boot-4.0.0-RC2.jar:4.0.0-RC2]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:454) ~[spring-boot-4.0.0-RC2.jar:4.0.0-RC2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) ~[spring-boot-4.0.0-RC2.jar:4.0.0-RC2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1374) ~[spring-boot-4.0.0-RC2.jar:4.0.0-RC2]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363) ~[spring-boot-4.0.0-RC2.jar:4.0.0-RC2]
	at net.frey.sdjpa_intro.SdjpaIntroApplication.main(SdjpaIntroApplication.java:10) ~[main/:na]
Caused by: java.lang.IllegalArgumentException: Could not find class [org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:353) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:451) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:384) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:273) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:191) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:143) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:110) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.registerBeanDefinitionForImportedConfigurationClass(ConfigurationClassBeanDefinitionReader.java:168) ~[spring-context-7.0.0-RC3.jar:7.0.0-RC3]
	... 15 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:528) ~[na:na]
	at java.base/java.lang.Class.forName0(Native Method) ~[na:na]
	at java.base/java.lang.Class.forName(Class.java:578) ~[na:na]
	at java.base/java.lang.Class.forName(Class.java:557) ~[na:na]
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:302) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:343) ~[spring-core-7.0.0-RC3.jar:7.0.0-RC3]
	... 22 common frames omitted

Describe the solution you'd like

The library is compatible with Spring Boot 4.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions