Skip to content

Commit

Permalink
更新版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
skyesx committed Nov 28, 2019
1 parent 673d3d8 commit ba7cc37
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import java.util.concurrent.Future;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.junit.Assert;
import org.junit.Test;
Expand All @@ -26,6 +27,7 @@

import com.yiqiniu.easytrans.core.ConsistentGuardian;
import com.yiqiniu.easytrans.core.EasytransConstant;
import com.yiqiniu.easytrans.extensionsuite.impl.database.GetExtentionSuiteDatabase;
import com.yiqiniu.easytrans.log.TransactionLogReader;
import com.yiqiniu.easytrans.log.impl.database.DataBaseTransactionLogConfiguration.DataBaseForLog;
import com.yiqiniu.easytrans.log.vo.LogCollection;
Expand Down Expand Up @@ -80,6 +82,8 @@ public class FullTest {
private WalletService walletService;
@Autowired(required=false)
private DataBaseForLog dbForLog;
@Autowired(required=false)
private GetExtentionSuiteDatabase suiteDatabase;

@Resource
private CouponService couponService;
Expand Down Expand Up @@ -561,8 +565,16 @@ private void cleanAndSetUp() {
"TRUNCATE `undo_log`"
});

if(dbForLog != null){
JdbcTemplate transLogJdbcTemplate = new JdbcTemplate(dbForLog.getDataSource());
if(dbForLog != null || suiteDatabase != null){

DataSource dataSource = null;
if(dbForLog != null) {
dataSource = dbForLog.getDataSource();
} else {
dataSource = suiteDatabase.getDataSource();
}

JdbcTemplate transLogJdbcTemplate = new JdbcTemplate(dataSource);
transLogJdbcTemplate
.batchUpdate(new String[] { "TRUNCATE `trans_log_unfinished`", "TRUNCATE `trans_log_detail`", });
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<revision>1.4.0</revision>
<revision>1.4.2</revision>
</properties>


Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<dependency>
<groupId>com.yiqiniu.easytrans</groupId>
<artifactId>easytrans-starter</artifactId>
<version>1.4.0</version>
<version>1.4.2</version>
</dependency>

Starter里包含了若干默认的组件实现:基于mysql的分布式事务日志存储,基于ribbon-rest的RPC实现,基于KAFKA的消息队列,若不需要或者要替换,可以EXCLUDE掉
Expand Down

0 comments on commit ba7cc37

Please sign in to comment.