Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4c471a8
feature: console/namingserver/server: spring-boot upgrade to 4.0.5
xuxiaowei-com-cn Apr 16, 2026
7677556
feature: disabled test AppenderTest#testAppenderEnabled
xuxiaowei-com-cn Apr 16, 2026
74a215a
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Apr 27, 2026
de2a0a9
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Apr 29, 2026
97a44d8
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: r…
xuxiaowei-com-cn Apr 29, 2026
8bedc77
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: f…
xuxiaowei-com-cn Apr 29, 2026
4188fdc
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: c…
xuxiaowei-com-cn Apr 29, 2026
2da5ce1
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: f…
xuxiaowei-com-cn Apr 29, 2026
9b9b7fb
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: f…
xuxiaowei-com-cn Apr 29, 2026
7559add
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: f…
xuxiaowei-com-cn Apr 29, 2026
e5266cf
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: f…
xuxiaowei-com-cn Apr 29, 2026
d2a8276
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: f…
xuxiaowei-com-cn Apr 29, 2026
c6417c3
feature: console/namingserver/server: spring-boot upgrade to 4.0.5: a…
xuxiaowei-com-cn Apr 29, 2026
c56c0f0
feature: console/namingserver/server: spring-boot upgrade to 4.0.6
xuxiaowei-com-cn Apr 29, 2026
421999c
feature: console/namingserver/server: spring-boot upgrade to 4.0.6: f…
xuxiaowei-com-cn Apr 29, 2026
a454fc4
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 3, 2026
c61161a
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 6, 2026
64bb8e2
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 6, 2026
eb5af7f
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 8, 2026
00f911f
optimize: console/namingserver/server modules:spring-boot upgrade to …
xuxiaowei-com-cn May 8, 2026
7756068
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 9, 2026
fbb74ec
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 10, 2026
372c37b
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 12, 2026
b079b7d
Merge remote-tracking branch 'origin/2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 12, 2026
22585c2
chore: remove duplicate changelog entries
xuxiaowei-com-cn May 12, 2026
67583a3
Merge remote-tracking branch 'origin/2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 15, 2026
68fa525
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn May 25, 2026
94b5946
Merge remote-tracking branch 'origin/2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Jun 1, 2026
1ca5d32
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Jun 8, 2026
c8d20de
adapt: update AutoConfigureMockMvc import for Spring Boot 4.x webmvc …
xuxiaowei-com-cn Jun 8, 2026
accbfe9
Merge remote-tracking branch 'origin/2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Jun 9, 2026
72bea95
feature: console/namingserver: spring-boot upgrade to 4.0.6
xuxiaowei-com-cn Jun 9, 2026
5b6ca02
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Jun 10, 2026
28ad948
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Jun 22, 2026
3ce5cc3
spotless: apply code formatting to LockStoreDataBaseDAOBatchAcquireTest
xuxiaowei-com-cn Jun 22, 2026
7d3a17e
Merge branch '2.x' into xuxiaowei/spring-boot-4.x
xuxiaowei-com-cn Jun 25, 2026
7f2f10d
Potential fix for pull request finding
funky-eyes Jul 2, 2026
e4ddf76
Potential fix for pull request finding
funky-eyes Jul 3, 2026
b173ecf
fix: log exception with stack trace instead of just message
xuxiaowei-com-cn Jul 6, 2026
84ee326
fix: migrate MCP console Jackson 2 API to Jackson 3 for Spring Boot 4.x
xuxiaowei-com-cn Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Add changes here for all PR submitted to the 2.x branch.


### optimize:
- [[#8054](https://github.com/apache/incubator-seata/pull/8054)] console/namingserver modules: spring-boot upgrade to 4.0.6
- [[#8137](https://github.com/apache/incubator-seata/pull/8137)] server modules: spring-boot upgrade to 4.0.6


Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@


### optimize:
- [[#8054](https://github.com/apache/incubator-seata/pull/8054)] console/namingserver 模块: spring-boot 升级到 4.0.6
- [[#8137](https://github.com/apache/incubator-seata/pull/8137)] server 模块: spring-boot 升级到 4.0.6


Expand Down
4 changes: 2 additions & 2 deletions console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<description>console for Seata built with Maven</description>

<properties>
<spring-boot-for-server.version>3.5.2</spring-boot-for-server.version>
<spring-framework-for-server.version>6.2.8</spring-framework-for-server.version>
<spring-boot-for-server.version>4.0.6</spring-boot-for-server.version>
<spring-framework-for-server.version>7.0.7</spring-framework-for-server.version>
<snakeyaml-for-server.version>2.0</snakeyaml-for-server.version>
<tomcat-embed.version>11.0.22</tomcat-embed.version>
<spring-ai.version>1.1.0</spring-ai.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@
*/
package org.apache.seata.console.config;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;
import tools.jackson.core.JacksonException;
import tools.jackson.core.JsonGenerator;
import tools.jackson.databind.SerializationContext;
import tools.jackson.databind.ValueSerializer;
import tools.jackson.databind.module.SimpleModule;

@Configuration(proxyBeanMethods = false)
public class JacksonConfig {
Expand All @@ -32,19 +31,19 @@ public class JacksonConfig {
* convert long to string for return to the front end
*/
@Bean
public Jackson2ObjectMapperBuilderCustomizer longToStringCustomizer() {
return jacksonObjectMapperBuilder ->
jacksonObjectMapperBuilder.serializerByType(Long.class, new JsonSerializer<Long>() {
@Override
public void serialize(
Long value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider)
throws IOException {
if (value == null) {
jsonGenerator.writeString("");
} else {
jsonGenerator.writeString(value.toString());
}
}
});
public SimpleModule customModule() {
SimpleModule module = new SimpleModule();
module.addSerializer(Long.class, new ValueSerializer<Long>() {
@Override
public void serialize(Long value, JsonGenerator jsonGenerator, SerializationContext ctxt)
throws JacksonException {
if (value == null) {
jsonGenerator.writeString("");
} else {
jsonGenerator.writeString(value.toString());
}
}
});
return module;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
*/
package org.apache.seata.console.config;

import jakarta.servlet.http.HttpServletRequest;
import org.apache.seata.common.util.StringUtils;
import org.apache.seata.console.filter.JwtAuthenticationTokenFilter;
import org.apache.seata.console.security.CustomUserDetailsServiceImpl;
import org.apache.seata.console.security.JwtAuthenticationEntryPoint;
import org.apache.seata.console.utils.JwtTokenUtils;
import org.apache.seata.mcp.core.props.MCPProperties;
import org.jspecify.annotations.NonNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
Expand All @@ -39,8 +41,8 @@
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.csrf.CookieCsrfTokenRepository;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.util.matcher.RequestMatcher;
import org.springframework.util.AntPathMatcher;

import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -98,9 +100,9 @@ public PasswordEncoder passwordEncoder() {
}

@Bean
public AuthenticationManager authenticationManager() {
public AuthenticationManager authenticationManager(PasswordEncoder passwordEncoder) {
DaoAuthenticationProvider authenticationProvider = new DaoAuthenticationProvider(userDetailsService);
authenticationProvider.setPasswordEncoder(passwordEncoder());
authenticationProvider.setPasswordEncoder(passwordEncoder);
return new ProviderManager(authenticationProvider);
}

Expand Down Expand Up @@ -150,7 +152,20 @@ private RequestMatcher[] buildAntMatchers(String patterns) {
.filter(StringUtils::isNotBlank)
// PathPatternParser using the new version of Security cannot directly achieve the same matching effect
// as the deprecated Ant style mode /**/*.css
.map(AntPathRequestMatcher::new)
.map(pattern -> new RequestMatcher() {
private final AntPathMatcher matcher = new AntPathMatcher();

@Override
public boolean matches(@NonNull HttpServletRequest request) {
String path = request.getServletPath();
String pathInfo = request.getPathInfo();
path = (path == null ? "" : path) + (pathInfo == null ? "" : pathInfo);
if (path == null || path.isEmpty()) {
path = "/";
}
return matcher.match(pattern, path);
}
})
.toArray(RequestMatcher[]::new);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@
*/
package org.apache.seata.mcp.core.config;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import tools.jackson.core.JacksonException;
import tools.jackson.core.JsonParser;
import tools.jackson.databind.DeserializationContext;
import tools.jackson.databind.ValueDeserializer;

import java.io.IOException;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

public class TimestampToStringDeserializer extends JsonDeserializer<String> {
public class TimestampToStringDeserializer extends ValueDeserializer<String> {
private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

@Override
public String deserialize(JsonParser p, DeserializationContext cxt) throws IOException {
public String deserialize(JsonParser p, DeserializationContext ctxt) throws JacksonException {
long timestamp = p.getLongValue();
LocalDateTime dateTime =
Instant.ofEpochMilli(timestamp).atZone(ZoneId.systemDefault()).toLocalDateTime();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
*/
package org.apache.seata.mcp.core.utils;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.util.UriComponentsBuilder;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.ObjectMapper;

import java.util.Collections;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.seata.mcp.core.config.TimestampToStringDeserializer;
import org.apache.seata.server.console.entity.vo.BranchSessionVO;
import tools.jackson.databind.annotation.JsonDeserialize;

import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.ANY;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package org.apache.seata.mcp.entity.vo;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.seata.mcp.core.config.TimestampToStringDeserializer;
import tools.jackson.databind.annotation.JsonDeserialize;

public class McpGlobalLockVO {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.apache.seata.mcp.core.config.TimestampToStringDeserializer;
import org.apache.seata.server.console.entity.vo.GlobalSessionVO;
import tools.jackson.databind.annotation.JsonDeserialize;

import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.seata.mcp.service.impl;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.seata.common.exception.AuthenticationFailedException;
import org.apache.seata.common.util.StringUtils;
import org.apache.seata.console.config.WebSecurityConfig;
Expand All @@ -39,6 +38,7 @@
import org.springframework.util.StreamUtils;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestClientException;
import tools.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*/
package org.apache.seata.mcp.tools;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.seata.common.result.PageResult;
import org.apache.seata.common.util.StringUtils;
import org.apache.seata.mcp.core.constant.RPCConstant;
Expand All @@ -36,6 +33,9 @@
import org.springaicommunity.mcp.annotation.McpTool;
import org.springaicommunity.mcp.annotation.McpToolParam;
import org.springframework.stereotype.Service;
import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -94,8 +94,8 @@ public PageResult<McpGlobalLockVO> queryGlobalLock(
nameSpaceDetail, RPCConstant.GLOBAL_LOCK_BASE_URL + "/query", param, null, null);
try {
result = objectMapper.readValue(response, new TypeReference<PageResult<McpGlobalLockVO>>() {});
} catch (JsonProcessingException e) {
logger.error(e.getMessage());
} catch (JacksonException e) {
logger.error("Failed to parse global lock query response", e);
}
if (result == null) {
return PageResult.failure("", "query global lock failed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
*/
package org.apache.seata.mcp.tools;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.seata.common.result.PageResult;
import org.apache.seata.common.util.StringUtils;
import org.apache.seata.core.model.GlobalStatus;
Expand All @@ -37,6 +34,9 @@
import org.springaicommunity.mcp.annotation.McpTool;
import org.springaicommunity.mcp.annotation.McpToolParam;
import org.springframework.stereotype.Service;
import tools.jackson.core.JacksonException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.ObjectMapper;

import java.util.ArrayList;
import java.util.HashMap;
Expand Down Expand Up @@ -104,8 +104,8 @@ public PageResult<McpGlobalSessionVO> queryGlobalSession(
nameSpaceDetail, RPCConstant.GLOBAL_SESSION_BASE_URL + "/query", param, null, null);
try {
pageResult = objectMapper.readValue(result, new TypeReference<PageResult<McpGlobalSessionVO>>() {});
} catch (JsonProcessingException e) {
logger.error(e.getMessage());
} catch (JacksonException e) {
logger.error("Failed to parse global session response", e);
}
if (pageResult == null) {
return PageResult.failure("", "query global session failed");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
*/
package org.apache.seata.mcp.tools;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.seata.common.result.SingleResult;
import org.apache.seata.mcp.core.constant.RPCConstant;
import org.apache.seata.mcp.service.ConsoleApiService;
import org.springaicommunity.mcp.annotation.McpTool;
import org.springframework.stereotype.Service;
import tools.jackson.core.JacksonException;
import tools.jackson.databind.JsonNode;
import tools.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -50,7 +50,7 @@ public SingleResult<?> getTCNameSpaces() {
if (dataNode != null && !dataNode.isNull()) {
nameSpacesVo.put("namespaces", dataNode.toString());
}
} catch (JsonProcessingException e) {
} catch (JacksonException e) {
return SingleResult.failure("Get namespace failed:" + e.getMessage());
}
return SingleResult.success(nameSpacesVo);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.seata.mcp.service.impl;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.seata.console.config.WebSecurityConfig;
import org.apache.seata.console.utils.JwtTokenUtils;
import org.apache.seata.mcp.core.props.NameSpaceDetail;
Expand All @@ -32,6 +31,7 @@
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestClient;
import tools.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.List;
Expand Down
18 changes: 16 additions & 2 deletions namingserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

<properties>
<java.version>25</java.version>
<spring-boot-for-server.version>3.5.2</spring-boot-for-server.version>
<spring-framework-for-server.version>6.2.8</spring-framework-for-server.version>
<spring-boot-for-server.version>4.0.6</spring-boot-for-server.version>
<spring-framework-for-server.version>7.0.7</spring-framework-for-server.version>
<snakeyaml-for-server.version>2.0</snakeyaml-for-server.version>
<tomcat-embed.version>11.0.22</tomcat-embed.version>
</properties>
Expand Down Expand Up @@ -169,6 +169,20 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-restclient</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-restclient-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package org.apache.seata.namingserver.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.seata.common.metadata.ClusterRole;
import org.apache.seata.common.metadata.Node;
import org.apache.seata.common.metadata.namingserver.NamingServerNode;
Expand All @@ -39,6 +37,8 @@
import org.springframework.util.StreamUtils;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestClientException;
import tools.jackson.core.JacksonException;
import tools.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -179,8 +179,8 @@ public String getCallNameSpace(String path) {
String namespace;
try {
namespace = objectMapper.writeValueAsString(namingManager.namespace());
} catch (JsonProcessingException e) {
LOGGER.error("Get NameSpace failed: {}", e.getMessage());
} catch (JacksonException e) {
LOGGER.error("Get NameSpace failed:", e);
return "Failed to get namespace";
}
return namespace;
Expand Down
Loading
Loading