|
@@ -2,7 +2,9 @@ package com.sf.controller;
|
|
|
|
|
|
import com.sf.dto.UserDto;
|
|
import com.sf.dto.UserDto;
|
|
import com.sf.remote.MyProviderClient;
|
|
import com.sf.remote.MyProviderClient;
|
|
|
|
+import jakarta.annotation.Resource;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Qualifier;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
@@ -13,7 +15,8 @@ import java.util.Map;
|
|
public class ProviderController {
|
|
public class ProviderController {
|
|
|
|
|
|
// 把MyProviderClient作为对象 从spring容器中注入进来
|
|
// 把MyProviderClient作为对象 从spring容器中注入进来
|
|
- @Autowired
|
|
|
|
|
|
+ @Resource
|
|
|
|
+// @Autowired
|
|
private MyProviderClient myProviderClient;
|
|
private MyProviderClient myProviderClient;
|
|
|
|
|
|
// http://localhost:8080/openfeign/echo/123456
|
|
// http://localhost:8080/openfeign/echo/123456
|