From c9f7314cd0e02201940a7800e5668bb4bbd932be Mon Sep 17 00:00:00 2001 From: 孤舟烟雨 <494979+gzyy@user.noreply.gitee.com> Date: 星期五, 13 八月 2021 10:03:46 +0800 Subject: [PATCH] !77 update 对象存储配置 重构到数据库 动态配置 * 增加对象存储配置sql * 修改对象存储配置 * Merge branch 'dev' of https://gitee.com/JavaLionLi/RuoYi-Vue-Plus into dev * 增加对象存储配置 * 增加对象存储配置 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/FeignConfig.java | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FeignConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FeignConfig.java index f10769b..14db1c9 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FeignConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FeignConfig.java @@ -54,4 +54,40 @@ return new Retryer.Default(); } +// /** +// * 鑷畾涔夊紓甯歌В鐮佸櫒 +// * 鐢ㄤ簬鑷畾涔夎繑鍥炰綋寮傚父鐔旀柇 +// */ +// @Bean +// public ErrorDecoder errorDecoder() { +// return new CustomErrorDecoder(); +// } +// +// +// /** +// * 鑷畾涔夎繑鍥炰綋瑙g爜鍣� +// */ +// @Slf4j +// public static class CustomErrorDecoder implements ErrorDecoder { +// +// @Override +// public Exception decode(String methodKey, Response response) { +// Exception exception = null; +// try { +// // 鑾峰彇鍘熷鐨勮繑鍥炲唴瀹� +// String json = JsonUtils.toJsonString(response.body().asReader(StandardCharsets.UTF_8)); +// exception = new RuntimeException(json); +// // 灏嗚繑鍥炲唴瀹瑰弽搴忓垪鍖栦负Result锛岃繖閲屽簲鏍规嵁鑷韩椤圭洰浣滀慨鏀� +// AjaxResult result = JsonUtils.parseObject(json, AjaxResult.class); +// // 涓氬姟寮傚父鎶涘嚭绠�鍗曠殑 RuntimeException锛屼繚鐣欏師鏉ラ敊璇俊鎭� +// if (result.getCode() != 200) { +// exception = new RuntimeException(result.getMsg()); +// } +// } catch (IOException e) { +// log.error(e.getMessage(), e); +// } +// return exception; +// } +// } + } -- Gitblit v1.9.3