提交 3237201e 编写于 作者: zhouweidong's avatar zhouweidong

调整路由排序,外部服务接口(中台模式)优先级高于rt路由优先级,防止路由被覆盖。

上级 2647a10b
...@@ -10,6 +10,14 @@ TARGET=PSSYSAPP ...@@ -10,6 +10,14 @@ TARGET=PSSYSAPP
</#if> </#if>
</#list> </#list>
</#if> </#if>
<#assign haswfentity=false>
<#list item.getAllPSAppDataEntities() as appDataEntity>
<#assign psDataEntity=appDataEntity.getPSDataEntity()>
<#if psDataEntity.hasPSDEWF()?? && psDataEntity.hasPSDEWF()==true>
<#assign haswfentity=true>
<#break>
</#if>
</#list>
server: server:
port: ${httpPort} port: ${httpPort}
#Log配置 #Log配置
...@@ -20,42 +28,13 @@ logging: ...@@ -20,42 +28,13 @@ logging:
#zuul网关路由设置 #zuul网关路由设置
zuul: zuul:
routes: routes:
<#assign haswfentity=false> <#if haswfentity==true>
<#list item.getAllPSAppDataEntities() as appDataEntity>
<#assign serviceId="">
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
<#assign appEntity=appDataEntity.name?lower_case>
<#assign psDataEntity=appDataEntity.getPSDataEntity()>
<#assign systemName=sys.getCodeName()?lower_case>
<#if psDataEntity.hasPSDEWF()?? && psDataEntity.hasPSDEWF()==true>
<#assign haswfentity=true>
</#if>
<#assign sybSysServiceType=(psDataEntity.getPSSubSysServiceAPI().getServiceType())!''>
<#comment>服务类型为中台和MASA走自身处理</#comment>
<#if psDataEntity.getStorageMode()==4 && (sybSysServiceType!='MIDDLEPLATFORM' && sybSysServiceType!='MASA')>
<#comment>serviceApi模式</#comment>
<#assign serviceId=(psDataEntity.getPSSubSysServiceAPI().getServiceCodeName())!''>
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
<#else>
<#assign sysApi=appDataEntity.getPSDEServiceAPI().getPSSysServiceAPI().codeName?lower_case>
<#assign deApi=appDataEntity.getPSDEServiceAPI().codeName?lower_case>
<#assign serviceId=systemName+"-"+sysApi>
</#if>
<#if serviceId!="">
<#assign serviceId="$"+"{ibiz.ref.service."+serviceId?lower_case+":"+serviceId+"}">
${appEntity}:
path: /${serviceUrl}/**
serviceId: ${serviceId}
stripPrefix: false
</#if>
</#list>
<#if haswfentity==true>
wfcore: wfcore:
path: /wfcore/** path: /wfcore/**
serviceId: ${r'${ibiz.ref.service.wf:ibzwf-api}'} serviceId: ${r'${ibiz.ref.service.wf:ibzwf-api}'}
stripPrefix: true stripPrefix: true
</#if> </#if>
<#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1> <#if sys.getPSSystemSetting()?? && sys.getPSSystemSetting().getDataAccCtrlArch()?? && sys.getPSSystemSetting().getDataAccCtrlArch()==1>
loginv7: loginv7:
path: /v7/login path: /v7/login
serviceId: ${r'${ibiz.ref.service.uaa:ibzuaa-api}'} serviceId: ${r'${ibiz.ref.service.uaa:ibzuaa-api}'}
...@@ -72,7 +51,7 @@ zuul: ...@@ -72,7 +51,7 @@ zuul:
path: /configs/** path: /configs/**
serviceId: ${r'${ibiz.ref.service.uaa:ibzuaa-api}'} serviceId: ${r'${ibiz.ref.service.uaa:ibzuaa-api}'}
stripPrefix: false stripPrefix: false
<#if sys.getCodeName()!='ibzou' && sys.getCodeName()!='ibzrt'> <#if sys.getCodeName()!='ibzou' && sys.getCodeName()!='ibzrt'>
oucore: oucore:
path: /ibzorganizations/** path: /ibzorganizations/**
serviceId: ${r'${ibiz.ref.service.ou:ibzou-api}'} serviceId: ${r'${ibiz.ref.service.ou:ibzou-api}'}
...@@ -113,8 +92,33 @@ zuul: ...@@ -113,8 +92,33 @@ zuul:
path: /sysauthlogs path: /sysauthlogs
serviceId: ${r'${ibiz.ref.service.uaa:ibzuaa-api}'} serviceId: ${r'${ibiz.ref.service.uaa:ibzuaa-api}'}
stripPrefix: false stripPrefix: false
</#if> </#if>
</#if> </#if>
<#list item.getAllPSAppDataEntities() as appDataEntity>
<#assign serviceId="">
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
<#assign appEntity=appDataEntity.name?lower_case>
<#assign psDataEntity=appDataEntity.getPSDataEntity()>
<#assign systemName=sys.getCodeName()?lower_case>
<#assign sybSysServiceType=(psDataEntity.getPSSubSysServiceAPI().getServiceType())!''>
<#comment>服务类型为中台和MASA走自身处理</#comment>
<#if psDataEntity.getStorageMode()==4 && (sybSysServiceType!='MIDDLEPLATFORM' && sybSysServiceType!='MASA')>
<#comment>serviceApi模式</#comment>
<#assign serviceId=(psDataEntity.getPSSubSysServiceAPI().getServiceCodeName())!''>
<#assign serviceUrl=srfpluralize(appDataEntity.codeName?lower_case)>
<#else>
<#assign sysApi=appDataEntity.getPSDEServiceAPI().getPSSysServiceAPI().codeName?lower_case>
<#assign deApi=appDataEntity.getPSDEServiceAPI().codeName?lower_case>
<#assign serviceId=systemName+"-"+sysApi>
</#if>
<#if serviceId!="">
<#assign serviceId="$"+"{ibiz.ref.service."+serviceId?lower_case+":"+serviceId+"}">
${appEntity}:
path: /${serviceUrl}/**
serviceId: ${serviceId}
stripPrefix: false
</#if>
</#list>
<#comment>通过设置该参数,避免Zuul转发请求时丢失Authorization请求头信息</#comment> <#comment>通过设置该参数,避免Zuul转发请求时丢失Authorization请求头信息</#comment>
sensitive-headers: sensitive-headers:
- Cookie,Set-Cookie,Authorization - Cookie,Set-Cookie,Authorization
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册