trade:增加 gateway 转发
This commit is contained in:
parent
162f34a6c4
commit
e26b29c5eb
@ -110,6 +110,19 @@ spring:
|
||||
- Path=/app-api/promotion/**
|
||||
filters:
|
||||
- RewritePath=/app-api/promotion/v3/api-docs, /v3/api-docs
|
||||
## trade-server 服务
|
||||
- id: trade-admin-api # 路由的编号
|
||||
uri: grayLb://trade-server
|
||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
||||
- Path=/admin-api/trade/**
|
||||
filters:
|
||||
- RewritePath=/admin-api/trade/v3/api-docs, /v3/api-docs # 配置,保证转发到 /v3/api-docs
|
||||
- id: trade-app-api # 路由的编号
|
||||
uri: grayLb://trade-server
|
||||
predicates: # 断言,作为路由的匹配条件,对应 RouteDefinition 数组
|
||||
- Path=/app-api/trade/**
|
||||
filters:
|
||||
- RewritePath=/app-api/trade/v3/api-docs, /v3/api-docs
|
||||
x-forwarded:
|
||||
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
|
||||
|
||||
@ -142,3 +155,6 @@ knife4j:
|
||||
- name: promotion-server
|
||||
service-name: promotion-server
|
||||
url: /admin-api/promotion/v3/api-docs
|
||||
- name: trade-server
|
||||
service-name: trade-server
|
||||
url: /admin-api/trade/v3/api-docs
|
||||
|
@ -17,7 +17,7 @@ import java.util.Map;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 会员用户的")
|
||||
@Tag(name = "RPC 服务 - 会员用户")
|
||||
public interface MemberUserApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/user";
|
||||
|
@ -5,8 +5,8 @@ import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||
import cn.iocoder.yudao.module.member.convert.user.MemberUserConvert;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
@ -19,7 +19,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@Service
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Validated
|
||||
public class MemberUserApiImpl implements MemberUserApi {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user