fix:多个feign同名错误修复

This commit is contained in:
haoxr 2021-03-17 22:39:16 +08:00
parent 1ebd8ba99e
commit 8ff6362660
10 changed files with 18 additions and 17 deletions

View File

@ -2,7 +2,7 @@ package com.youlai.mall.oms;
import com.youlai.mall.pms.api.app.PmsSkuFeignService; import com.youlai.mall.pms.api.app.PmsSkuFeignService;
import com.youlai.mall.ums.api.app.UmsMemberFeignService; import com.youlai.mall.ums.api.UmsMemberFeignService;
import org.springframework.amqp.rabbit.annotation.EnableRabbit; import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -15,7 +15,7 @@ import com.youlai.mall.oms.service.IOrderPayService;
import com.youlai.mall.oms.service.IOrderService; import com.youlai.mall.oms.service.IOrderService;
import com.youlai.mall.pms.api.app.PmsSkuFeignService; import com.youlai.mall.pms.api.app.PmsSkuFeignService;
import com.youlai.mall.pms.pojo.dto.InventoryDTO; import com.youlai.mall.pms.pojo.dto.InventoryDTO;
import com.youlai.mall.ums.api.app.UmsMemberFeignService; import com.youlai.mall.ums.api.UmsMemberFeignService;
import io.seata.spring.annotation.GlobalTransactional; import io.seata.spring.annotation.GlobalTransactional;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;

View File

@ -30,8 +30,8 @@ import com.youlai.mall.pms.api.app.PmsSkuFeignService;
import com.youlai.mall.pms.pojo.domain.PmsSku; import com.youlai.mall.pms.pojo.domain.PmsSku;
import com.youlai.mall.pms.pojo.dto.InventoryDTO; import com.youlai.mall.pms.pojo.dto.InventoryDTO;
import com.youlai.mall.pms.pojo.dto.SkuDTO; import com.youlai.mall.pms.pojo.dto.SkuDTO;
import com.youlai.mall.ums.api.app.UmsAddressFeignService; import com.youlai.mall.ums.api.UmsAddressFeignService;
import com.youlai.mall.ums.api.app.UmsMemberFeignService; import com.youlai.mall.ums.api.UmsMemberFeignService;
import com.youlai.mall.ums.pojo.domain.UmsAddress; import com.youlai.mall.ums.pojo.domain.UmsAddress;
import io.seata.spring.annotation.GlobalTransactional; import io.seata.spring.annotation.GlobalTransactional;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;

View File

@ -1,16 +1,14 @@
package com.youlai.mall.ums.api.app; package com.youlai.mall.ums.api;
import com.youlai.common.result.Result; import com.youlai.common.result.Result;
import com.youlai.mall.ums.pojo.domain.UmsAddress; import com.youlai.mall.ums.pojo.domain.UmsAddress;
import com.youlai.mall.ums.pojo.domain.UmsMember;
import com.youlai.mall.ums.pojo.dto.AuthMemberDTO;
import com.youlai.mall.ums.pojo.dto.MemberDTO;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List; import java.util.List;
@FeignClient(value = "mall-ums") @FeignClient(name = "ums-address")
public interface UmsAddressFeignService { public interface UmsAddressFeignService {
/** /**

View File

@ -1,4 +1,4 @@
package com.youlai.mall.ums.api.app; package com.youlai.mall.ums.api;
import com.youlai.common.result.Result; import com.youlai.common.result.Result;
import com.youlai.mall.ums.pojo.domain.UmsMember; import com.youlai.mall.ums.pojo.domain.UmsMember;
@ -7,7 +7,7 @@ import com.youlai.mall.ums.pojo.dto.MemberDTO;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@FeignClient(value = "mall-ums") @FeignClient(name = "ums-member")
public interface UmsMemberFeignService { public interface UmsMemberFeignService {
@PostMapping("/api.app/v1/users") @PostMapping("/api.app/v1/users")
@ -46,7 +46,6 @@ public interface UmsMemberFeignService {
Result<Long> getBalance(@PathVariable Long id); Result<Long> getBalance(@PathVariable Long id);
} }

View File

@ -33,6 +33,11 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<dependency> <dependency>
<groupId>com.alibaba.cloud</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>

View File

@ -1,7 +1,7 @@
package com.youlai.auth; package com.youlai.auth;
import com.youlai.admin.api.UserFeignService; import com.youlai.admin.api.UserFeignService;
import com.youlai.mall.ums.api.app.UmsMemberFeignService; import com.youlai.mall.ums.api.UmsMemberFeignService;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

View File

@ -10,7 +10,7 @@ import com.youlai.common.result.Result;
import com.youlai.common.result.ResultCode; import com.youlai.common.result.ResultCode;
import com.youlai.common.web.exception.BizException; import com.youlai.common.web.exception.BizException;
import com.youlai.common.web.util.RequestUtils; import com.youlai.common.web.util.RequestUtils;
import com.youlai.mall.ums.api.app.UmsMemberFeignService; import com.youlai.mall.ums.api.UmsMemberFeignService;
import com.youlai.mall.ums.pojo.domain.UmsMember; import com.youlai.mall.ums.pojo.domain.UmsMember;
import com.youlai.mall.ums.pojo.dto.AuthMemberDTO; import com.youlai.mall.ums.pojo.dto.AuthMemberDTO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;

View File

@ -8,7 +8,7 @@ import com.youlai.common.result.Result;
import com.youlai.common.result.ResultCode; import com.youlai.common.result.ResultCode;
import com.youlai.common.web.util.RequestUtils; import com.youlai.common.web.util.RequestUtils;
import com.youlai.mall.ums.pojo.dto.AuthMemberDTO; import com.youlai.mall.ums.pojo.dto.AuthMemberDTO;
import com.youlai.mall.ums.api.app.UmsMemberFeignService; import com.youlai.mall.ums.api.UmsMemberFeignService;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.security.authentication.AccountExpiredException; import org.springframework.security.authentication.AccountExpiredException;
import org.springframework.security.authentication.DisabledException; import org.springframework.security.authentication.DisabledException;

View File

@ -10,7 +10,6 @@ spring:
server-addr: http://c.youlai.store:8848 server-addr: http://c.youlai.store:8848
namespace: prod_namespace_id namespace: prod_namespace_id
config: config:
# docker启动nacos-server需要配置
server-addr: ${spring.cloud.nacos.discovery.server-addr} server-addr: ${spring.cloud.nacos.discovery.server-addr}
file-extension: yaml file-extension: yaml
namespace: prod_namespace_id namespace: prod_namespace_id