dear dsyer
damozhiying opened this issue · comments
dear dsyer,special thanks
from your post ,i benefit more,but now i have two problem to resolve
first ,i use ui gateway to offer one point endpoint services ,at the same time ,the backends service machine can't be access by the Internet, when users open the browser the ui server route to the sso system,when login success,the sso server redirect to the ui gateway ,the ui gateway according to the session id get user info from redis ,now the requirements is according to the userID, the ui gateway route to different pc get ui pages.
the first problem is how i get zuul route config info from database
the second is how ui gateway according to userid to route to diff pc,(because some service such as http://192.168.1.22, there not the context, at the same time can't use http Re-direct 302, ) dynamic add the zuul route and bypass to the diff pc get ui page )
1: after login success ,the sso server popup the confirm access page, but i don't want this page,i wish redirect to the ui gateway
2: how the sso server use spring session to share the session info to redis.
3: spring cloud config get config into from database
@RequestMapping("/reDirect")
public String reDirect(HttpServletRequest request) {
ZuulRoute route_cy=new ZuulRoute();
route_cy.setId("erp_cy");
route_cy.setPath("/erp_cy/**");
route_cy.setUrl("http://169.254.50.169:8081");
discoveryClientRouteLocator.addRoute(route_cy);
ZuulRoute route_gwzx=new ZuulRoute();
route_gwzx.setId("erp_gwzx");
route_gwzx.setPath("/erp_gwzx/**");
route_gwzx.setUrl(" http://localhost:9000");
discoveryClientRouteLocator.addRoute(route_gwzx);
String id=request.getSession().getId();
return "redirect:/erp_gwzx/";
}
above code run in ui gateway but can't work well ,the error is 404(above route_cy,route_gwzx can't be config in application.yml because the route info is dynamic,we don't know before the ui gateway startup )
If you have a specific issue with a specific sample app, please fork this repository and make changes in your fork, then post a reference to the sample that you modified. Then we might be able to understand your questions. If the question is a general usage question (not about the samples here), please take it to stack overflow.
No response, so closing.