Browse Source

Merge branch 'dev/2024/0611/update-admin-Y' of Harper/feifan-backend-zx-admin into master

修改bean的依赖注入
Yangzw 9 months ago
parent
commit
ff4bed38e3

+ 2 - 0
feifan-module-mall/feifan-module-trade-biz/src/main/java/cn/newfeifan/mall/module/trade/utils/wechat/WcChatMessageUtils.java

@@ -18,6 +18,7 @@ import com.google.gson.JsonObject;
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Component;
 
@@ -53,6 +54,7 @@ public class WcChatMessageUtils {
     @Resource
     private MessageLogService messageLogService;
     @Resource
+    @Lazy
     private SystemConfigService configService;
     @Resource
     private PermissionService permissionService;

+ 2 - 0
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/controller/admin/config/SystemConfigController.java

@@ -1,5 +1,6 @@
 package cn.newfeifan.mall.module.system.controller.admin.config;
 
+import org.springframework.context.annotation.Lazy;
 import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import org.springframework.validation.annotation.Validated;
@@ -35,6 +36,7 @@ import cn.newfeifan.mall.module.system.service.config.SystemConfigService;
 public class SystemConfigController {
 
     @Resource
+    @Lazy
     private SystemConfigService configService;
 
     @PostMapping("/create")