trade:增加 gateway 转发
parent
162f34a6c4
commit
e26b29c5eb
|
@ -110,6 +110,19 @@ spring:
|
||||||
- Path=/app-api/promotion/**
|
- Path=/app-api/promotion/**
|
||||||
filters:
|
filters:
|
||||||
- RewritePath=/app-api/promotion/v3/api-docs, /v3/api-docs
|
- 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:
|
x-forwarded:
|
||||||
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
|
prefix-enabled: false # 避免 Swagger 重复带上额外的 /admin-api/system 前缀
|
||||||
|
|
||||||
|
@ -142,3 +155,6 @@ knife4j:
|
||||||
- name: promotion-server
|
- name: promotion-server
|
||||||
service-name: promotion-server
|
service-name: promotion-server
|
||||||
url: /admin-api/promotion/v3/api-docs
|
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;
|
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
|
||||||
|
|
||||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||||
@Tag(name = "RPC 服务 - 会员用户的")
|
@Tag(name = "RPC 服务 - 会员用户")
|
||||||
public interface MemberUserApi {
|
public interface MemberUserApi {
|
||||||
|
|
||||||
String PREFIX = ApiConstants.PREFIX + "/user";
|
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.convert.user.MemberUserConvert;
|
||||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -19,7 +19,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
*
|
*
|
||||||
* @author 芋道源码
|
* @author 芋道源码
|
||||||
*/
|
*/
|
||||||
@Service
|
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||||
@Validated
|
@Validated
|
||||||
public class MemberUserApiImpl implements MemberUserApi {
|
public class MemberUserApiImpl implements MemberUserApi {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue