Skip to content

feature: console/namingserver: spring-boot upgrade to 4.0.6#8054

Open
xuxiaowei-com-cn wants to merge 38 commits into
apache:2.xfrom
xuxiaowei-com-cn:xuxiaowei/spring-boot-4.x
Open

feature: console/namingserver: spring-boot upgrade to 4.0.6#8054
xuxiaowei-com-cn wants to merge 38 commits into
apache:2.xfrom
xuxiaowei-com-cn:xuxiaowei/spring-boot-4.x

Conversation

@xuxiaowei-com-cn

@xuxiaowei-com-cn xuxiaowei-com-cn commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

https://github.com/redis/jedis/blob/master/docs/migration-guides/v3-to-v4.md

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

#8053

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov

codecov Bot commented Apr 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.83%. Comparing base (c92f96f) to head (e4ddf76).

Additional details and impacted files
@@             Coverage Diff              @@
##                2.x    #8054      +/-   ##
============================================
+ Coverage     72.81%   72.83%   +0.02%     
  Complexity     1141     1141              
============================================
  Files          1151     1151              
  Lines         42272    42272              
  Branches       5045     5045              
============================================
+ Hits          30781    30790       +9     
+ Misses         9013     9008       -5     
+ Partials       2478     2474       -4     

see 3 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xuxiaowei-com-cn xuxiaowei-com-cn force-pushed the xuxiaowei/spring-boot-4.x branch from b13848a to 08445e9 Compare April 16, 2026 11:40
@xuxiaowei-com-cn xuxiaowei-com-cn force-pushed the xuxiaowei/spring-boot-4.x branch from de2a3ce to 7677556 Compare April 16, 2026 12:07
@funky-eyes funky-eyes added type: feature Category issues or prs related to feature request. module/server server module module/console module/namingserver labels Apr 17, 2026
@funky-eyes funky-eyes added this to the 2.x Backlog milestone Apr 17, 2026
@funky-eyes funky-eyes requested a review from Copilot April 17, 2026 09:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the server / console / namingserver modules to newer Spring Boot / Spring Framework generations and adjusts affected code (Jakarta annotations, Spring Boot API package moves, and related test infrastructure) to keep these modules compiling and running under the newer stack.

Changes:

  • Bump Spring Boot / Spring Framework versions in module POMs and update affected imports/APIs (e.g., ServerProperties, WebServerInitializedEvent, javax.annotationjakarta.annotation).
  • Update Redis/Jedis pooling abstractions and Redis-related tests to match newer Jedis APIs.
  • Update test infrastructure for the new Spring stack (e.g., @MockBean@MockitoBean, MockMvc test artifact changes), plus minor CI adjustments.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
server/src/test/java/org/apache/seata/server/storage/redis/store/RedisTransactionStoreManagerTest.java Updates Redis sorted-set query result types in tests.
server/src/test/java/org/apache/seata/server/storage/redis/JedisPooledFactoryTest.java Updates pool abstraction usage in Jedis pool tests.
server/src/test/java/org/apache/seata/server/session/redis/RedisQueryConsolTest.java Migrates @Resource import to jakarta.annotation.
server/src/test/java/org/apache/seata/server/session/FileSessionManagerTest.java Migrates @Resource import to jakarta.annotation.
server/src/test/java/org/apache/seata/server/logging/AppenderTest.java Modifies Logback context access and disables the test method.
server/src/test/java/org/apache/seata/server/lock/LockManagerTest.java Migrates @Resource import to jakarta.annotation.
server/src/test/java/org/apache/seata/server/instance/RaftServerInstanceStrategyTest.java Updates ServerProperties import for newer Spring Boot.
server/src/test/java/org/apache/seata/server/console/impl/db/GlobalSessionDBServiceImplTest.java Replaces @MockBean with @MockitoBean.
server/src/test/java/org/apache/seata/server/console/impl/db/GlobalLockDBServiceImplTest.java Replaces @MockBean with @MockitoBean.
server/src/test/java/org/apache/seata/server/console/impl/db/BranchSessionDBServiceImplTest.java Replaces @MockBean with @MockitoBean.
server/src/test/java/org/apache/seata/server/LoaderConfTest.java Minor assertion style adjustment (static assertEquals).
server/src/main/java/org/apache/seata/server/storage/redis/store/RedisTransactionStoreManager.java Updates Redis sorted-set query result types for newer Jedis APIs.
server/src/main/java/org/apache/seata/server/storage/redis/JedisPooledFactory.java Switches Jedis pool type to Pool<Jedis> and updates factory signature.
server/src/main/java/org/apache/seata/server/instance/RaftServerInstanceStrategy.java Migrates @Resource import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/instance/AbstractSeataInstanceStrategy.java Migrates lifecycle/resource annotations to jakarta.annotation and updates ServerProperties import.
server/src/main/java/org/apache/seata/server/controller/ClusterController.java Migrates @Resource import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/console/impl/db/GlobalSessionDBServiceImpl.java Migrates @Resource import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/console/controller/GlobalSessionController.java Migrates @Resource import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/console/controller/GlobalLockController.java Migrates @Resource import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/console/controller/BranchSessionController.java Migrates @Resource import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/config/ServerConfig.java Updates ServerProperties import for newer Spring Boot.
server/src/main/java/org/apache/seata/server/cluster/raft/context/SeataClusterContext.java Migrates nullability annotations to jakarta.annotation.
server/src/main/java/org/apache/seata/server/cluster/manager/ClusterWatcherManager.java Migrates @PostConstruct import to jakarta.annotation.
server/src/main/java/org/apache/seata/server/ServerRunner.java Migrates @Resource and updates WebServerInitializedEvent import.
server/src/main/java/org/apache/seata/server/Server.java Migrates @Resource import to jakarta.annotation.
server/pom.xml Upgrades Spring Boot / Framework versions and adds a Spring Boot web-server dependency.
namingserver/src/test/java/org/apache/seata/namingserver/AuthControllerWithRandomPasswordTest.java Updates MockMvc auto-config import and ObjectMapper package.
namingserver/src/test/java/org/apache/seata/namingserver/AuthControllerWithCustomPropertiesTest.java Updates MockMvc auto-config import and ObjectMapper package.
namingserver/src/main/java/org/apache/seata/namingserver/service/ConsoleLocalServiceImpl.java Switches ObjectMapper package and simplifies namespace serialization logic.
namingserver/src/main/java/org/apache/seata/namingserver/config/WebConfig.java Replaces OkHttp-based RestTemplate factory with JDK HttpClient-based factory.
namingserver/pom.xml Upgrades Spring Boot / Framework versions and adds webmvc-test dependency (test scope).
console/src/main/java/org/apache/seata/mcp/tools/NameSpaceTools.java Switches to Jackson 3 (tools.jackson) and removes JSON parse exception handling.
console/src/main/java/org/apache/seata/mcp/tools/GlobalSessionTools.java Switches to Jackson 3 (tools.jackson) and removes JSON parse exception handling.
console/src/main/java/org/apache/seata/mcp/tools/GlobalLockTools.java Switches to Jackson 3 (tools.jackson) and removes JSON parse exception handling.
console/src/main/java/org/apache/seata/mcp/service/impl/ConsoleRemoteServiceImpl.java Switches ObjectMapper import to Jackson 3 (tools.jackson).
console/src/main/java/org/apache/seata/mcp/core/utils/UrlUtils.java Switches Jackson imports to Jackson 3 (tools.jackson).
console/src/main/java/org/apache/seata/console/config/WebSecurityConfig.java Updates Security matcher construction for newer Spring Security APIs.
console/src/main/java/org/apache/seata/console/config/JacksonConfig.java Replaces Jackson2 builder customizer with a Jackson 3 SimpleModule serializer.
console/pom.xml Upgrades Spring Boot / Framework versions and bumps Tomcat embed version.
changes/zh-cn/2.x.md Adds changelog entry for this upgrade.
changes/en-us/2.x.md Adds changelog entry for this upgrade.
.github/workflows/build.yml Excludes server from the Java 8 job build list.
Comments suppressed due to low confidence (1)

server/pom.xml:108

  • With the Spring Boot 4 / Spring Framework 7 upgrade in this module, the server should be consistently on the jakarta.* servlet APIs. server/pom.xml still declares a dependency on javax.servlet:javax.servlet-api (later in the dependencies list), which will conflict with the Jakarta-based web stack and can lead to compilation/type-mismatch issues. Please switch the servlet API dependency to the appropriate jakarta.servlet artifact (or remove it if it’s no longer needed).
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-web-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/test/java/org/apache/seata/server/logging/AppenderTest.java Outdated
Comment thread console/src/main/java/org/apache/seata/mcp/tools/GlobalLockTools.java Outdated

@xuxiaowei-com-cn xuxiaowei-com-cn left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xuxiaowei-com-cn xuxiaowei-com-cn changed the title feature: console/namingserver/server: spring-boot upgrade to 4.0.6 feature: console/namingserver: spring-boot upgrade to 4.0.6 Jun 9, 2026
@xuxiaowei-com-cn

xuxiaowei-com-cn commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@funky-eyes funky-eyes removed the module/server server module label Jun 30, 2026
@funky-eyes funky-eyes modified the milestones: 2.x Backlog, 2.8.0 Jun 30, 2026
@funky-eyes funky-eyes requested a review from Copilot June 30, 2026 05:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Comment thread console/src/main/java/org/apache/seata/console/config/WebSecurityConfig.java Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Comment on lines +97 to 99
} catch (JacksonException e) {
logger.error(e.getMessage());
}
Comment on lines +182 to 185
} catch (JacksonException e) {
LOGGER.error("Get NameSpace failed: {}", e.getMessage());
return "Failed to get namespace";
}
Comment on lines 103 to +107
String result = mcpRPCService.getCallTC(
nameSpaceDetail, RPCConstant.GLOBAL_SESSION_BASE_URL + "/query", param, null, null);
try {
pageResult = objectMapper.readValue(result, new TypeReference<PageResult<McpGlobalSessionVO>>() {});
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
Comment on lines 93 to +97
String response = mcpRPCService.getCallTC(
nameSpaceDetail, RPCConstant.GLOBAL_LOCK_BASE_URL + "/query", param, null, null);
try {
result = objectMapper.readValue(response, new TypeReference<PageResult<McpGlobalLockVO>>() {});
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/console module/namingserver type: feature Category issues or prs related to feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants