同步操作将从 open-hand/choerodon-starters 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
The package modifies spring cloud config client 1.3.x
to achieve the purpose of zuul route hot updating. After modifying the route through the manager-service
page, the api-gateway
and gateway-helper
's services do not need to be restarted, the routing takes effect dynamically, and the route for the HelperZuulRoutesProperties
is hot-updated. The properties are used to store custom gateway helpers that the service passes through.
Implement zuul's routing hot update.
Implements routing thermal updates of HelperZuulRoutesProperties
. The route is used to determine whether to request the default gateway-helper
or the customized gateway-helper
to authenticate and limit the flow.
Principle of realization:
Then,the api-gateway and gateway-helper will call the package's ConfigServicePropertySourceLocator
's locate method to pull the configuration, modify the implementation of the locate method to add operations on updating the zuul route and the HelperZuulRoutesProperties
route, and send a RoutesRefreshedEvent
event to implement the route's hot update.
spring cloud bus
.manager-servic
e only supports api-gateway
and gateway-helper'
s services to obtain routing information.git clone https://github.com/choerodon/choerodon-starters.git
Add dependencies (replace zuul's original spring-cloud-config-client
):
<dependency>
<groupId>io.choerodon</groupId>
<artifactId>choerodon-starter-config-client</artifactId>
<version>0.10.1.RELEASE</version>
</dependency>
Add a bean using the service to make it effective:
@Bean
public RouteLocator memoryRouterOperator() {
return new MemoryRouteLocator(this.server.getServletPrefix(), this.zuulProperties);
}
@Bean
public RouterOperator routerOperator(ApplicationEventPublisher publisher,
RouteLocator routeLocator) {
return new RouterOperator(publisher, routeLocator);
}
## Reporting Issues
If you find any shortcomings or bugs, please describe them in the Issue.
Pull requests are welcome! Follow this link for more information on how to contribute.
manager-service
only supports api-gateway
and gateway-helper
services to obtain routing information. To add additional services to pull routing information, configure the choerodon.gateway.names
attribute in manager-service
.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。