Zuul gateway microservice controller layer method inaccessible problem

problem description

A controller, has been added to the gateway layer to manipulate the cache. Due to the file upload garbled problem, servlet-path configuration was added to solve the garbled problem. At this point, the garbled problem was solved, but it was found that controller could not be accessed. The console prints No route found for uri: / serviceCache/clearCacheByName, so how can I access the methods in controller?

clipboard.png

clipboard.png

Feb.11,2022

is zuul.servlet-path configured? In fact, there is also a server.servlet-path , which defaults to / . It should be you who conflict with each other. The question is that configuring this can solve the file garbled? The garbled code should have something to do with the coding setting.


how to access controller at the gateway layer

Menu