huanghongfa
2020-12-22 ac0c5875bb29f1684cf5641acfaa600f7e3aa8fd
修改全局异常
4个文件已修改
99 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/exception/GlobalExceptionCapture.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/bootstrap.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -23,33 +23,9 @@
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change afterPath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/config/MyMetaObjectHandler.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/config/MyMetaObjectHandler.java" afterDir="false" />
      <change afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/config/MybatisPlusConfig.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/LoginApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/api/UserApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/exception/GlobalExceptionCapture.java" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/java/com/panzhihua/applets/exception/GlobalExceptionCapture.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/applets/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/applets_backstage/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/applets_backstage/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComActMicroWishVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructHouseVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngStructHouseVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngFamilyInfoVO.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/model/vos/user/ComMngFamilyInfoVO.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComActEasyPhotoVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComActEasyPhotoVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComActMicroWishVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComActMicroWishVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComMngStructHouseVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComMngStructHouseVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/community/ComMngVolunteerMngVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/user/ComMngFamilyInfoVO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/model/vos/user/ComMngFamilyInfoVO.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/community/CommunityService.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/community/CommunityService.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_community/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/resources/bootstrap.yml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/resources/bootstrap.yml" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/resources/bootstrap.yml" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
@@ -400,7 +376,7 @@
      <workItem from="1608371107059" duration="646000" />
      <workItem from="1608371917868" duration="79000" />
      <workItem from="1608379508016" duration="46000" />
      <workItem from="1608531425658" duration="38249000" />
      <workItem from="1608531425658" duration="41448000" />
    </task>
    <servers />
  </component>
@@ -452,54 +428,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1606197830966" />
    <state width="1031" height="342" key="GridCell.Tab.0.bottom" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.0.bottom" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.0.center" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.0.center" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.0.left" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.0.left" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.0.right" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.0.right" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.1.bottom" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.bottom" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.1.center" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.center" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.1.left" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.left" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.1.right" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.1.right" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.2.bottom" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.bottom" timestamp="1608631728647">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.2.center" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608631728647" />
    <state width="1031" height="342" key="GridCell.Tab.2.center" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.2.left" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.left" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.2.right" timestamp="1608628027944">
    <state width="1031" height="342" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state width="1031" height="342" key="GridCell.Tab.2.right" timestamp="1608631728646">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1608628027944" />
    <state width="1031" height="342" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1608631728646" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1606714311663">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/UserApi.java
@@ -132,6 +132,7 @@
        if (null==id||0==id) {
            return R.fail("成员主键不能为空");
        }
        comMngFamilyInfoVO.setUserId(this.getUserId());
        return userService.putFamily(comMngFamilyInfoVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/exception/GlobalExceptionCapture.java
@@ -54,16 +54,16 @@
        return R.fail(ex.getCode(),ex.getMsg());
    }
    /**
     * 全局异常捕捉处理
     * @param ex 所有运行时异常
     * @return R 500
     */
    @ExceptionHandler(value = Exception.class)
    public R errorHandler(Exception ex) {
        log.error("捕捉到全局异常【{}】",ex.getMessage());
        return R.fail();
    }
//    /**
//     * 全局异常捕捉处理
//     * @param ex 所有运行时异常
//     * @return R 500
//     */
//    @ExceptionHandler(value = Exception.class)
//    public R errorHandler(Exception ex) {
//        log.error("捕捉到全局异常【{}】",ex.getMessage());
//        return R.fail(ex.getMessage());
//    }
    /**
     * 校验异常
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/resources/bootstrap.yml
@@ -6,9 +6,9 @@
      discovery:
        enabled: true
        service-id: config  # 注册中心的服务名
      profile: test  # 指定配置文件的环境
      profile: dev  # 指定配置文件的环境
  profiles:
    active: test
    active: dev
eureka:
  client: