hr~ il y a 3 jours
Parent
commit
c69a578126

+ 10 - 0
product-common/src/main/java/com/poyee/exception/GlobalExceptionHandler.java

@@ -41,6 +41,16 @@ public class GlobalExceptionHandler {
         return Result.error(500, "系统繁忙,请稍后重试");
     }
 
+
+    /**
+     * 处理其他异常
+     */
+    @ExceptionHandler(IllegalArgumentException.class)
+    public Result<Void> handleIllegalArgumentException(IllegalArgumentException e) {
+        ServletUtils.getHttpResponse().setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+        return Result.error(e.getMessage());
+    }
+
     /**
      * 参数错误
      */

+ 12 - 0
product-web/src/main/resources/application.yml

@@ -37,3 +37,15 @@ feign:
 logging:
   level:
     com.poyee: info
+
+# 腾讯云COS配置
+tencent:
+  cos:
+    secret-id: ${TENCENT_COS_SECRET_ID:AKIDeCb2X834B3yz4EUdpzyoQoCRWUcm1JgT}
+    secret-key: ${TENCENT_COS_SECRET_KEY:dXUSPLGHLSd58C6nGUTJySiyFUgrz236}
+    region: ${TENCENT_COS_REGION:ap-shanghai}
+    bucket-name: ${TENCENT_COS_BUCKET_NAME:b2b-1309648802}
+    domain: ${TENCENT_COS_DOMAIN:https://your-domain.com}
+    prefix: ${TENCENT_COS_PREFIX:/mongoo/rating/images/}
+    max-file-size: ${TENCENT_COS_MAX_FILE_SIZE:10485760}
+    allow-file-types: ${TENCENT_COS_ALLOW_FILE_TYPES:jpg,jpeg,png,gif,bmp,webp}