linxk 1 день назад
Родитель
Сommit
1707b1fee6

+ 3 - 2
operating-service/src/main/java/com/txz/operating/configurer/StartLoadConfig.java

@@ -11,6 +11,7 @@ import org.springframework.boot.CommandLineRunner;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.Resource;
 import java.util.List;
 
 /**
@@ -20,9 +21,9 @@ import java.util.List;
 @Slf4j
 public class StartLoadConfig implements CommandLineRunner {
 
-    @Autowired
+    @Resource
     private RedisTemplate redisTemplate;
-    @Autowired
+    @Resource
     private InterfacesService interfacesService;
 
     @Override

+ 3 - 1
operating-service/src/main/java/com/txz/operating/web/ReloadCacheController.java

@@ -9,6 +9,8 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
+
 /**
  * @Author: Fcx
  * @Date: 2019/12/31 17:22
@@ -19,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("reload")
 public class ReloadCacheController {
 
-    @Autowired
+    @Resource
     private StartLoadConfig startLoadConfig;
 
     @GetMapping("interfaces")