This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-argus-service/src/main/java/com/nis/util/ExceptionUtil.java
RenKaiGe-Office fcf302a1b9 1:添加maat配置取消测试方法
2:优化maat配置新增测试方法
3:在applicationContext-redis.xml中新增没有事务的redistemplate
4:将查询key的值,获取自增长值,判断key是否存在的方法抽取出来使用没有事务的redistemplate操作(在删除配置逻辑中有时候判断key是否存在,获取key的值等时,使用开启事务的redistemplate会返回,查看源码发现在执行以上操作前会先判断是否开启了multi,如果开启直接返回null)
2018-06-26 14:52:10 +08:00

32 lines
684 B
Java

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;
}
}