mirror of
https://github.com/abcv7/sfbx-cloud.git
synced 2026-08-16 19:49:49 +00:00
功能:在保险、规则、交易、积分和短信模块中实现初始功能和基础组件。
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<artifactId>sfbx-framework</artifactId>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<!--基础模块-seata支持-->
|
||||
<artifactId>framework-seata</artifactId>
|
||||
<name>framework-seata</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itheima.sfbx</groupId>
|
||||
<artifactId>framework-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.seata</groupId>
|
||||
<artifactId>seata-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.itheima.sfbx.framework.seata;
|
||||
|
||||
import com.alibaba.cloud.seata.web.SeataHandlerInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @ClassName SeataWebMvcConfig.java
|
||||
* @Description webMvc高级配置
|
||||
*/
|
||||
@Configuration
|
||||
public class SeataWebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
/***
|
||||
* @description 解决XID传递问题
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public SeataHandlerInterceptor seataHandlerInterceptor(){
|
||||
return new SeataHandlerInterceptor();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 拦截器
|
||||
*/
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(seataHandlerInterceptor()).addPathPatterns("/**");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user