Home > Back-end >  Spring cloud zuul redirection problem
Spring cloud zuul redirection problem

Time:09-26

Zuul configuration: port 8050
 
Zuul:
Add - host - the header: true
The prefix:/microservice - server
Routes:
Microservice - server:/* *

Order the controller layer of service: port 7900
 
@ RequestMapping ("/updateRoom ")
Public String updateRoom (@ ModelAttribute Room record) {
RoomService. UpdateRoom (record);
Return "redirect:/roomList";
}

Question:
By visiting http://localhost:8050/microservice-server/updateRoom, return "redirect:/roomList"; Be redirected, although zuul add add - host - the header configuration: true to prevent the jump to the upstream service, but redirect to http://localhost:8050/roomList, to redirect http://localhost:8050/microservice-server/roomList,, which is filtered out the prefix, troublesome everybody bosses provide Suggestions or solutions,
  • Related