Commit 83551ea9 by chamberone

feat: 解决微服务加载问题

1 parent c309bbf6
......@@ -11,8 +11,8 @@ import reactor.core.publisher.Mono;
@EnableDiscoveryClient
@SpringBootApplication
//@EnableFeignClients(basePackages = {"com.dituhui.pea.gateway", "com.dituhui.pea.user"})
@EnableFeignClients
@EnableFeignClients(basePackages = {"com.dituhui.pea.user"})
//@EnableFeignClients
public class Application {
@Bean
......
......@@ -21,8 +21,8 @@ import reactor.core.publisher.Mono;
@Slf4j
public class AuthFilter implements GlobalFilter, Ordered {
//@Autowired
//IUser userService;
@Autowired
IUser userService;
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
......
......@@ -11,9 +11,8 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* 角色相关接口
* @author zl
*/
@FeignClient(value = "project-user")
@FeignClient(value = "project-user", contextId = "role")
public interface IRole {
/**
......
......@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(value = "project-user")
@FeignClient(value = "project-user", contextId = "test")
public interface ITest {
/**
......
......@@ -17,7 +17,7 @@ import com.dituhui.pea.pojo.WebResult;
* 用户相关接口
* @author
*/
@FeignClient(value = "project-user")
@FeignClient(value = "project-user", contextId = "user")
public interface IUser {
@RequestMapping(value = "/pea-user/login", method = RequestMethod.POST)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!