Want to put Knife4j Integrated into the gateway The method in , You can find many things on the Internet . I'll sort it out here , The method is roughly :
however , Maybe you will have a problem , Namely doc When the page opens , You can see the corresponding microservice group , however , But I can't see the interface list .
That's because , Your microservice documentation , Is in /v2/apis-doc In the route .
and gateway Of nacos Configure forwarding , It is equipped with such interception and forwarding
- id: sys_route
uri: lb://cloud-sys
predicates:
- Path=/api/sys/** It will lead to microservices sys_route The final request of the document splicing is /api/sys/v2/apis-doc
The solution is , Use gateway Of filters To configure
- id: sys_route
uri: lb://cloud-sys
predicates:
- Path=/api/sys/**
filters:
- RewritePath=/api/sys/v2/api-docs, /v2/api-docs( First contact filters Of , Recommend taking another look StripPrefix attribute )
PS:Knife4j The authorities have also recently issued Knife4jAggregation Microservice version , You can deploy the microservice directly ( But you need to start an extra microservice , Memory is tight ...).
![[North Asia data recovery] data recovery case of ibm-ds3512 storage server RAID5 damaged data loss](/img/84/c8604f539db4658049406080d7f09a.jpg)

![[線性代數] 1.1 二階與三階行列式](/img/ea/70b59c64d3287a887e371a9181fe45.png)



![恢复二叉搜索树[根据题意模拟->发现问题->分析问题->见招拆招]](/img/06/cc3c512e69455416fe81943bebacca.png)
![Synchronous movement state of Jerry's watch [chapter]](/img/58/a7e73aa32c15ccc7c506d521ca2917.jpg)

