1:添加maat配置取消测试方法
2:优化maat配置新增测试方法 3:在applicationContext-redis.xml中新增没有事务的redistemplate 4:将查询key的值,获取自增长值,判断key是否存在的方法抽取出来使用没有事务的redistemplate操作(在删除配置逻辑中有时候判断key是否存在,获取key的值等时,使用开启事务的redistemplate会返回,查看源码发现在执行以上操作前会先判断是否开启了multi,如果开启直接返回null)
This commit is contained in:
31
src/main/java/com/nis/util/ExceptionUtil.java
Normal file
31
src/main/java/com/nis/util/ExceptionUtil.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.nis.util;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
|
||||
/**
|
||||
* <p>Title: ExceptionUtils.java</p>
|
||||
* <p>Description: 获取异常信息内容</p>
|
||||
* <p>Company: IIE</p>
|
||||
* @author rkg
|
||||
* @date 2018年3月5日
|
||||
*
|
||||
*/
|
||||
|
||||
public class ExceptionUtil {
|
||||
public static String getExceptionMsg(Exception e) {
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
PrintStream pout = new PrintStream(out);
|
||||
e.printStackTrace(pout);
|
||||
String msg = new String(out.toByteArray());
|
||||
pout.close();
|
||||
try {
|
||||
out.close();
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
return msg;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user