Parcourir la source

嵌套注入延时加载

zhouy il y a 3 ans
Parent
commit
504dae5671

+ 2 - 0
uas-office-qywx/src/main/java/com/usoftchina/uas/office/qywx/manage/controller/QywxAgentController.java

@@ -8,6 +8,7 @@ import com.usoftchina.uas.office.jdbc.DataSourceHolder;
 import com.usoftchina.uas.office.qywx.manage.entity.QywxAgent;
 import com.usoftchina.uas.office.qywx.manage.service.QywxAgentService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.web.bind.annotation.*;
 
 /**
@@ -22,6 +23,7 @@ public class QywxAgentController {
     private QywxAgentService qywxAgentService;
 
     @Autowired
+    @Lazy
     private QywxProperties qywxProperties;
 
     @GetMapping(path = "/agent")