debug
This commit is contained in:
118
pom.xml
118
pom.xml
@ -1,52 +1,70 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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"
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<modelVersion>4.0.0</modelVersion>
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
|
||||||
|
<parent>
|
||||||
<groupId>com.chinaunicom.ebtp</groupId>
|
<groupId>com.chinaunicom.ebtp</groupId>
|
||||||
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
<artifactId>mall-ebtp-cloud-parent</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||||
<artifactId>biz_service_ebtp_project</artifactId>
|
<artifactId>biz_service_ebtp_project</artifactId>
|
||||||
<version>0.0.1</version>
|
<version>0.0.1</version>
|
||||||
<name>biz_service_ebtp_project</name>
|
<name>biz_service_ebtp_project</name>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
<groupId>com.chinaunicom.mall.ebtp</groupId>
|
||||||
<artifactId>uboot-core</artifactId>
|
<artifactId>uboot-core</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-generator</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.chinaunicom.ebtp</groupId>
|
<groupId>com.chinaunicom.ebtp</groupId>
|
||||||
<artifactId>mall-ebtp-cloud-apollo-starter</artifactId>
|
<artifactId>mall-ebtp-cloud-apollo-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shardingsphere</groupId>
|
|
||||||
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
|
|
||||||
</dependency> -->
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>mysql</groupId>
|
<groupId>org.apache.shardingsphere</groupId>
|
||||||
<artifactId>mysql-connector-java</artifactId>
|
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.chinaunicom.ebtp</groupId>
|
<groupId>org.apache.shardingsphere</groupId>
|
||||||
<artifactId>mall-ebtp-cloud-attachment-sdk</artifactId>
|
<artifactId>sharding-transaction-base-seata-at</artifactId>
|
||||||
</dependency>
|
<version>4.0.0-RC2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- swagger-ui -->
|
<dependency>
|
||||||
<dependency>
|
<groupId>mysql</groupId>
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
</dependency>
|
||||||
<version>2.0.0</version>
|
|
||||||
</dependency>
|
<dependency>
|
||||||
</dependencies>
|
<groupId>com.chinaunicom.ebtp</groupId>
|
||||||
|
<artifactId>mall-ebtp-cloud-attachment-sdk</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- swagger-ui -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
<version>2.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
@ -63,25 +81,25 @@
|
|||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/java</directory>
|
<directory>src/main/java</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/mapper/*Mapper.xml</include>
|
<include>**/mapper/*Mapper.xml</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -1,47 +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.mybatis.spring.transaction.SpringManagedTransactionFactory;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
|
||||||
|
|
||||||
import com.alibaba.druid.pool.DruidDataSource;
|
|
||||||
|
|
||||||
import io.seata.rm.datasource.DataSourceProxy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数据源代理
|
|
||||||
*
|
|
||||||
* @author wangzhongxiang
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class DataSourceConfiguration {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
@ConfigurationProperties(prefix = "spring.datasource")
|
|
||||||
public DataSource druidDataSource() {
|
|
||||||
DruidDataSource druidDataSource = new DruidDataSource();
|
|
||||||
return druidDataSource;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Primary
|
|
||||||
@Bean("dataSource")
|
|
||||||
public DataSourceProxy dataSource(DataSource druidDataSource) {
|
|
||||||
return new DataSourceProxy(druidDataSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public SqlSessionFactory sqlSessionFactory(DataSourceProxy dataSourceProxy) throws Exception {
|
|
||||||
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
|
|
||||||
sqlSessionFactoryBean.setDataSource(dataSourceProxy);
|
|
||||||
sqlSessionFactoryBean.setTransactionFactory(new SpringManagedTransactionFactory());
|
|
||||||
|
|
||||||
return sqlSessionFactoryBean.getObject();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -24,12 +24,34 @@ spring:
|
|||||||
application:
|
application:
|
||||||
name: biz-service-ebtp-project
|
name: biz-service-ebtp-project
|
||||||
|
|
||||||
datasource:
|
shardingsphere:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
datasource:
|
||||||
url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
names: ds0
|
||||||
password: root
|
ds0:
|
||||||
username: root
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
username: root
|
||||||
|
password: root
|
||||||
|
jdbc-url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||||
|
url: jdbc:mysql://10.242.31.158:3033/ebtp_mall_project?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||||
|
filters: stat,wall,log4j
|
||||||
|
maxActive: 20
|
||||||
|
initialSize: 1
|
||||||
|
maxWait: 60000
|
||||||
|
minIdle: 1
|
||||||
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
|
minEvictableIdleTimeMillis: 300000
|
||||||
|
validationQuery: select 'x'
|
||||||
|
testWhileIdle: true
|
||||||
|
testOnBorrow: false
|
||||||
|
testOnReturn: false
|
||||||
|
poolPreparedStatements: true
|
||||||
|
maxOpenPreparedStatements: 20
|
||||||
|
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
|
||||||
|
props:
|
||||||
|
sql:
|
||||||
|
show: true
|
||||||
|
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
Reference in New Issue
Block a user