فهرست منبع

fix: Feign调用修改为非强制

zhangying 1 هفته پیش
والد
کامیت
0fa99a35e5

+ 11 - 0
zjrs-service-backend/src/main/java/com/zjrs/ZjrsServiceBackendApplication.java

@@ -20,6 +20,17 @@ import org.springframework.context.annotation.FilterType;
                         classes = {
                                 org.mohrss.leaf.ext.feign.filter.LeafFilterAutoConfiguration.class
                         }
+                ),
+                @ComponentScan.Filter(
+                        type = FilterType.ASSIGNABLE_TYPE,
+                        classes = {org.mohrss.leaf.auth.security.ContextInterceptor.class}
+                ),
+                @ComponentScan.Filter(
+                        type = FilterType.ASSIGNABLE_TYPE,
+                        classes = {
+                                org.mohrss.leaf.auth.security.ContextConfiguraction.class, // 排除配置类
+                                org.mohrss.leaf.auth.security.ContextInterceptor.class    // 排除拦截器类
+                        }
                 )
         }
 )

+ 2 - 1
zjrs-service-backend/src/main/java/com/zjrs/ggfw/rlzysc/blo/impl/DwzpBLOImpl.java

@@ -22,6 +22,7 @@ import com.zjrs.ggfw.rlzysc.dto.grzxjlxx.*;
 import com.zjrs.ggfw.rlzysc.entity.*;
 import com.zjrs.ggfw.rlzysc.po.*;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import jakarta.annotation.Resource;
@@ -79,7 +80,7 @@ public class DwzpBLOImpl extends BLOImpl implements DwzpBLO {
     @Resource
     RsRlzyZphfwLogMapper rsRlzyZphfwLogMapper;
 
-    @Resource
+    @Autowired(required = false)
     private JbxxglFeignClientBPO jbxxglFeignClientBPO;
 
     @Override

+ 3 - 2
zjrs-service-backend/src/main/java/com/zjrs/ggfw/rlzysc/blo/impl/GrqzBLOimpl.java

@@ -23,6 +23,7 @@ import com.zjrs.ggfw.rlzysc.utils.RlzyscUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -44,7 +45,7 @@ public class GrqzBLOimpl extends BLOImpl implements GrqzBLO {
     private static final Logger LOG = LoggerFactory.getLogger(GrqzBLOimpl.class);
     @Resource
     GwxxMapper gwxxMapper;
-    @Resource
+    @Autowired(required = false)
     WjfwFeignClientBPO wjfwFeignClientBPO;
     @Resource
     GrqzJlxxMapper grqzJlxxMapper;
@@ -95,7 +96,7 @@ public class GrqzBLOimpl extends BLOImpl implements GrqzBLO {
     @Resource
     JlglMapper jlglMapper;
 
-    @Resource
+    @Autowired(required = false)
     private JbxxglFeignClientBPO jbxxglFeignClientBPO;
 
     @Resource

+ 2 - 1
zjrs-service-backend/src/main/java/com/zjrs/ggfw/rlzysc/controller/JbxxglFeignClientController.java

@@ -3,6 +3,7 @@ package com.zjrs.ggfw.rlzysc.controller;
 import org.mohrss.leaf.core.framework.web.controller.AjaxResponse;
 import com.zjrs.ggfw.rlzysc.bpo.JbxxglFeignClientBPO;
 import com.zjrs.ggfw.rlzysc.dto.AreaDTO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -14,7 +15,7 @@ import jakarta.annotation.Resource;
 @RequestMapping("/api/rlzysc")
 public class JbxxglFeignClientController {
 
-    @Resource
+    @Autowired(required = false)
     private JbxxglFeignClientBPO jbxxglFeignClientBPO;
 
     @PostMapping(value = "/jbxxgl/jbxxglcommon/getXzqhTree")

+ 2 - 1
zjrs-service-backend/src/main/java/com/zjrs/zwnw/rlzysc/bpo/impl/QzzpglBPOimpl.java

@@ -7,6 +7,7 @@ import com.zjrs.zwnw.rlzysc.blo.QzzpglBLO;
 import com.zjrs.zwnw.rlzysc.bpo.QzzpglBPO;
 import com.zjrs.zwnw.rlzysc.bpo.UserFeignClientBPO;
 import com.zjrs.zwnw.rlzysc.dto.*;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import jakarta.annotation.Resource;
@@ -19,7 +20,7 @@ public class QzzpglBPOimpl extends BPOImpl implements QzzpglBPO {
     @Resource
     private QzzpglBLO qzzpglBLO;
 
-    @Resource
+    @Autowired(required = false)
     private UserFeignClientBPO userFeignClientBPO;
 
     @Override

+ 2 - 1
zjrs-service-backend/src/main/java/com/zjrs/zwnw/zj/blo/impl/GccrcBLOImpl.java

@@ -23,6 +23,7 @@ import com.zjrs.zwnw.zj.po.*;
 import com.zjrs.zwnw.zj.util.FileUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.mock.web.MockMultipartFile;
@@ -43,7 +44,7 @@ import java.util.zip.ZipInputStream;
 public class GccrcBLOImpl extends BLOImpl implements GccrcBLO {
     private static final Logger LOG = LoggerFactory.getLogger(GccrcBLOImpl.class);
 
-    @Resource
+    @Autowired(required = false)
     private WjfwFeignClientBPO wjfwFeignClientBPO;
     @Resource
     GccrcMapper gccrcMapper;