-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
optimize: First support spring:6.x
and spring-boot:3.x
#5115
optimize: First support spring:6.x
and spring-boot:3.x
#5115
Conversation
spring-boot:3.x
spring-boot:3.x
Codecov Report
@@ Coverage Diff @@
## develop #5115 +/- ##
=============================================
- Coverage 48.56% 48.53% -0.03%
- Complexity 4136 4139 +3
=============================================
Files 741 743 +2
Lines 26521 26544 +23
Branches 3294 3294
=============================================
+ Hits 12879 12884 +5
- Misses 12244 12261 +17
- Partials 1398 1399 +1
|
@@ -57,6 +57,7 @@ | |||
<testcontainers.version>1.11.2</testcontainers.version> | |||
<guava.version>27.0.1-jre</guava.version> | |||
<javax-inject.version>1</javax-inject.version> | |||
<jakarta.servlet-api.version>5.0.0</jakarta.servlet-api.version> |
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.
jakarta.servlet-api
从 6.0.0
版本开始,最低要求 java11
,所以最高只能使用 5.0.0
版本。
integration/http/src/main/java/io/seata/integration/http/HandlerInterceptorAdapter.java
Show resolved
Hide resolved
integration/http/src/main/java/io/seata/integration/http/HandlerInterceptorAdapter.java
Outdated
Show resolved
Hide resolved
spring-boot:3.x
spring-boot:3.x
and spring:6.x
spring-boot:3.x
and spring:6.x
spring:6.x
and spring-boot:3.x
spring:6.x
and spring-boot:3.x
spring:6.x
and spring-boot:3.x
integration/http/src/main/java/io/seata/integration/http/HandlerInterceptorAdapter.java
Show resolved
Hide resolved
integration/http/src/main/java/io/seata/integration/http/HandlerInterceptorAdapter.java
Outdated
Show resolved
Hide resolved
integration/http/src/main/java/io/seata/integration/http/HttpHandlerExceptionResolver.java
Outdated
Show resolved
Hide resolved
…tionPropagationInterceptor.afterCompletion(...)`.
...akarta/src/main/java/io/seata/integration/http/JakartaTransactionPropagationInterceptor.java
Show resolved
Hide resolved
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
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
Ⅰ. Describe what this PR did
optimize: First support
spring:6.x
andspring-boot:3.x
.优化:首次支持
spring:6.x
和spring-boot:3.x
。经测试,碰到的问题如下:
/META-INF/spring.factories
转移到/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
。为了兼容低版本springboot,两边都加。
springboot:3.x
,已将javax.servlet
包 要改成jakarta.servlet
包,需要jakarta.servlet-api
依赖的支持。XxxxAdapter
(适配器)类已不存在,自己添加相应的适配器类。所做的改造:
seata-http-jakarta
模块,含JakartaSeataWebMvcConfigurer.java
和JakartaTransactionPropagationInterceptor.java
两个类。/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
HandlerInterceptorAdapter.java
类,因为其功能与TransactionPropagationInterceptor.afterCompletion(...)
方法重复了。test.yml
添加了 基于springboot:3
的自动测试job。目前,仅针对client端,做了兼容
springboot3
,server端由于兼容性问题比较多,还未做过兼容。Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
请在我的测试项目中进行校验:
https://github.com/wangliang181230/study-spring-boot
Ⅴ. Special notes for reviews
代码变更比较简单,review难度不大。
基本上都是一些兼容性代码,并没有逻辑上的变动。