Browse Source

修改bean的依赖注入

Yangzw 9 months ago
parent
commit
882ff55081

+ 0 - 1
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/controller/admin/wechatmsgtemplate/WechatMsgTemplateController.java

@@ -36,7 +36,6 @@ import cn.newfeifan.mall.module.system.service.wechatmsgtemplate.WechatMsgTempla
 public class WechatMsgTemplateController {
 
     @Resource
-    @Lazy
     private WechatMsgTemplateService wechatMsgTemplateService;
 
     @PostMapping("/create")

+ 2 - 0
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/service/config/SystemConfigServiceImpl.java

@@ -3,6 +3,7 @@ package cn.newfeifan.mall.module.system.service.config;
 import cn.newfeifan.mall.module.system.config.StartConfig;
 import cn.newfeifan.mall.module.system.controller.admin.config.bo.SystemConfigBO;
 import com.alibaba.fastjson.JSONObject;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
@@ -34,6 +35,7 @@ public class SystemConfigServiceImpl implements SystemConfigService {
     @Resource
     private StringRedisTemplate stringRedisTemplate;
     @Resource
+    @Lazy
     private StartConfig startConfig;
 
 

+ 2 - 0
feifan-module-system/feifan-module-system-biz/src/main/java/cn/newfeifan/mall/module/system/service/wechatmsgtemplate/WechatMsgTemplateServiceImpl.java

@@ -3,6 +3,7 @@ package cn.newfeifan.mall.module.system.service.wechatmsgtemplate;
 import cn.newfeifan.mall.module.system.config.StartConfig;
 import cn.newfeifan.mall.module.system.controller.admin.wechatmsgtemplate.bo.WechatMsgTemplateBO;
 import com.alibaba.fastjson.JSONObject;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
@@ -36,6 +37,7 @@ public class WechatMsgTemplateServiceImpl implements WechatMsgTemplateService {
     private StringRedisTemplate stringRedisTemplate;
 
     @Resource
+    @Lazy
     private StartConfig startConfig;
     @Override
     public Long createWechatMsgTemplate(WechatMsgTemplateSaveReqVO createReqVO) {