diff --git a/src/main/java/com/chinaunicom/mall/ebtp/project/config/DataSourceProxyConfig.java b/src/main/java/com/chinaunicom/mall/ebtp/project/config/DataSourceProxyConfig.java deleted file mode 100644 index 39bbe11..0000000 --- a/src/main/java/com/chinaunicom/mall/ebtp/project/config/DataSourceProxyConfig.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.chinaunicom.mall.ebtp.project.config; - -import javax.sql.DataSource; - -import org.apache.ibatis.session.SqlSessionFactory; -import org.mybatis.spring.SqlSessionFactoryBean; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import com.alibaba.druid.pool.DruidDataSource; - -import io.seata.rm.datasource.DataSourceProxy; - -@Configuration -public class DataSourceProxyConfig { - - @Bean - @ConfigurationProperties(prefix = "spring.datasource") - public DataSource dataSource() { - return new DruidDataSource(); - } - - @Bean - public DataSourceProxy dataSourceProxy(DataSource dataSource) { - return new DataSourceProxy(dataSource); - } - - @Bean - public SqlSessionFactory sqlSessionFactoryBean(DataSourceProxy dataSourceProxy) throws Exception { - SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean(); - sqlSessionFactoryBean.setDataSource(dataSourceProxy); - return sqlSessionFactoryBean.getObject(); - } -} \ No newline at end of file diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 9a8b7a4..5fec330 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,12 +3,6 @@ server: servlet: context-path: / -seata: - enabled: true - application-id: biz-service-ebtp-project - tx-service-group: my_test_tx_group - - # 对应 apollo 配置中心的应用名 app: id: biz-service-ebtp-project