rewrite
plugin.shenyu-admin
--> BasicConfig --> Plugin --> rewrite
, set to enable.rewrite
support in the pom.xml
file of the gateway.<!-- apache shenyu rewrite plugin start--> <dependency> <groupId>org.apache.shenyu</groupId> <artifactId>shenyu-spring-boot-starter-plugin-rewrite</artifactId> <version>${project.version}</version> </dependency> <!-- apache shenyu rewrite plugin end-->
As the name suggests, rewrite is a redefinition of URI.
When the request is matched, set the user-defined path, and the user-defined path will overwrite the previous real path.
When invoking, the user-defined path will be used.