Table of contents
foreword
The recently built springbootboot gateway, configuration request path, did not take effect
Phenomenon
The configuration file is as follows:
Start the class, the results printed on the console are as follows:
I can change the port at will and it will take effect, it is the configuration file: /api can never be loaded
Solution
The gateway itself does not have contextPath, so it can handle contextPath by forwarding itself