添加mq的相关配置

This commit is contained in:
udf_admin@163.com
2017-11-19 21:45:38 +08:00
parent b25b8feca6
commit ce0d97e83d
2 changed files with 5 additions and 8 deletions
@@ -156,7 +156,7 @@ public class ExceptionController extends AbstractErrorController {
Exception exception = (Exception) object;
//ZuulException异常特殊处理,去除ZuulException的包裹 (不用instanceof的原因是不想因为这里的判断而引入zuul的依赖在core包中)
if (exception.getClass().getName().equals("com.netflix.zuul.exception.ZuulException")) { //NOSONAR
if (exception.getCause() instanceof PermissionException) {
if (exception.getCause() instanceof PermissionException) { // NOSONAR
status = HttpStatus.FORBIDDEN; //NOSONAR
} else if (exception.getCause() instanceof AuthException) {
status = HttpStatus.FORBIDDEN; //NOSONAR
@@ -44,7 +44,6 @@ public class RmsResponseErrorHandler extends DefaultResponseErrorHandler {
* @throws IOException 异常
*/
private String getData(InputStream in) throws IOException {
String result = "";
StringBuilder sb = new StringBuilder();
BufferedReader br = new BufferedReader(new InputStreamReader(in, "utf-8"));
String line;
@@ -54,12 +53,10 @@ public class RmsResponseErrorHandler extends DefaultResponseErrorHandler {
}
br.close();
} finally {
if (result != null) {
try {
br.close();
} catch (IOException e) {
log.error("getData", e);
}
try {
br.close();
} catch (IOException e) {
log.error("getData", e);
}
}
return sb.toString();