mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Upgrade the version to be 2.2.2.RELEASE
This commit is contained in:
parent
f10e750cbb
commit
35c4eac150
2
pom.xml
2
pom.xml
@ -80,7 +80,7 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!-- Project revision -->
|
<!-- Project revision -->
|
||||||
<revision>2.2.2-SNAPSHOT</revision>
|
<revision>2.2.2.RELEASE</revision>
|
||||||
|
|
||||||
<!-- Dependency Versions -->
|
<!-- Dependency Versions -->
|
||||||
<spring-cloud-commons.version>2.2.5.RELEASE</spring-cloud-commons.version>
|
<spring-cloud-commons.version>2.2.5.RELEASE</spring-cloud-commons.version>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<description>Spring Cloud Alibaba Dependencies</description>
|
<description>Spring Cloud Alibaba Dependencies</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>2.2.2-SNAPSHOT</revision>
|
<revision>2.2.2.RELEASE</revision>
|
||||||
<sentinel.version>1.8.0</sentinel.version>
|
<sentinel.version>1.8.0</sentinel.version>
|
||||||
<oss.version>3.1.0</oss.version>
|
<oss.version>3.1.0</oss.version>
|
||||||
<seata.version>1.3.0</seata.version>
|
<seata.version>1.3.0</seata.version>
|
||||||
|
@ -10,7 +10,7 @@ Spring Cloud Alibaba BOM 包含了它所使用的所有依赖的版本。
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||||
<version>2.2.0.RELEASE</version>
|
<version>2.2.2.RELEASE</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -8,7 +8,7 @@ If you’re a Maven Central user, add our BOM to your pom.xml <dependencyManagem
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
<groupId>com.alibaba.cloud</groupId>
|
||||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||||
<version>2.2.0.RELEASE</version>
|
<version>2.2.2.RELEASE</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -41,45 +41,46 @@ public class SeataHandlerInterceptor implements HandlerInterceptor {
|
|||||||
.getLogger(SeataHandlerInterceptor.class);
|
.getLogger(SeataHandlerInterceptor.class);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
|
||||||
String xid = RootContext.getXID();
|
Object handler) {
|
||||||
String rpcXid = request.getHeader(RootContext.KEY_XID);
|
String xid = RootContext.getXID();
|
||||||
if (log.isDebugEnabled()) {
|
String rpcXid = request.getHeader(RootContext.KEY_XID);
|
||||||
log.debug("xid in RootContext {} xid in RpcContext {}", xid, rpcXid);
|
if (log.isDebugEnabled()) {
|
||||||
}
|
log.debug("xid in RootContext {} xid in RpcContext {}", xid, rpcXid);
|
||||||
|
}
|
||||||
|
|
||||||
if (StringUtils.isBlank(xid) && rpcXid != null) {
|
if (StringUtils.isBlank(xid) && rpcXid != null) {
|
||||||
RootContext.bind(rpcXid);
|
RootContext.bind(rpcXid);
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("bind {} to RootContext", rpcXid);
|
log.debug("bind {} to RootContext", rpcXid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterCompletion(HttpServletRequest request, HttpServletResponse response,
|
||||||
|
Object handler, Exception e) {
|
||||||
|
if (StringUtils.isNotBlank(RootContext.getXID())) {
|
||||||
|
String rpcXid = request.getHeader(RootContext.KEY_XID);
|
||||||
|
|
||||||
@Override
|
if (StringUtils.isEmpty(rpcXid)) {
|
||||||
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception e) {
|
return;
|
||||||
if (StringUtils.isNotBlank(RootContext.getXID())) {
|
}
|
||||||
String rpcXid = request.getHeader(RootContext.KEY_XID);
|
|
||||||
|
|
||||||
if (StringUtils.isEmpty(rpcXid)) {
|
String unbindXid = RootContext.unbind();
|
||||||
return;
|
if (log.isDebugEnabled()) {
|
||||||
}
|
log.debug("unbind {} from RootContext", unbindXid);
|
||||||
|
}
|
||||||
String unbindXid = RootContext.unbind();
|
if (!rpcXid.equalsIgnoreCase(unbindXid)) {
|
||||||
if (log.isDebugEnabled()) {
|
log.warn("xid in change during RPC from {} to {}", rpcXid, unbindXid);
|
||||||
log.debug("unbind {} from RootContext", unbindXid);
|
if (unbindXid != null) {
|
||||||
}
|
RootContext.bind(unbindXid);
|
||||||
if (!rpcXid.equalsIgnoreCase(unbindXid)) {
|
log.warn("bind {} back to RootContext", unbindXid);
|
||||||
log.warn("xid in change during RPC from {} to {}", rpcXid, unbindXid);
|
}
|
||||||
if (unbindXid != null) {
|
}
|
||||||
RootContext.bind(unbindXid);
|
}
|
||||||
log.warn("bind {} back to RootContext", unbindXid);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user