-
Notifications
You must be signed in to change notification settings - Fork 26.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Spring Framework 6 and Spring Boot 3 #10941
Conversation
e772f9a
to
1efed55
Compare
dubbo-spring-boot/dubbo-spring-boot-actuator/src/main/resources/META-INF/spring.factories
Outdated
Show resolved
Hide resolved
...pache/dubbo/config/spring/beans/factory/annotation/ReferenceAnnotationBeanPostProcessor.java
Show resolved
Hide resolved
@@ -83,7 +83,7 @@ public class EmbeddedZooKeeper implements SmartLifecycle { | |||
* Construct an EmbeddedZooKeeper with a random port. | |||
*/ | |||
public EmbeddedZooKeeper() { | |||
clientPort = SocketUtils.findAvailableTcpPort(); | |||
clientPort = TestSocketUtils.findAvailableTcpPort(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SocketUtils
has been removed in Spring Framework 6.0 M3. see spring-projects/spring-framework#28052
1be16d9
to
471b9d1
Compare
…ties `InstantiationAwareBeanPostProcessor#postProcessPropertyValues` removed as of Spring Framework 6.0.0, in favor of `postProcessProperties` method.
Try to avoid using @javax.annotation.Resource to inject beans. Package javax.* has been migrated to jakarta.* in Jakarta EE 9.
Since Spring Boot 3, loading Auto-configuration classes is supported with `.imports` files only. In order to be compatible with the lower version of Spring Boot, we have retained the spring.factories file
…oot 3 With this commit, dubbo integration spring-boot-actuator will follow the same conditions regardless of Spring Boot version. This file was created on purpose only to satisfy the reasons above.
...test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/utils/TestSocketUtils.java
Outdated
Show resolved
Hide resolved
In my opinion |
@gitchenjh we should put the work ahead and provide convenience for possible maven profile with Spring 6.x. |
...n/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
Show resolved
Hide resolved
@weixsun |
Done. |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit is closing gh-10565
What is the purpose of the change
Since Spring Boot 3, loading Auto-configuration classes is supported with
.imports
files only.In order to be compatible with the lower version of Spring Boot, we have retained the
spring.factories
fileReferenceAnnotationBeanPostProcessor
to be compatible with Spring & Spring Boot lower versionsTestSocketUtils
to replaceSocketUtils
Checklist