mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
4.2.5
This commit is contained in:
@@ -35,8 +35,12 @@ public class RestfulController {
|
|||||||
return proxy.uri(uri).forward();
|
return proxy.uri(uri).forward();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从path中解析出serviceId
|
||||||
|
* @param path 格式:/rest/<serviceId><real_path>
|
||||||
|
* @return 返回serviceId
|
||||||
|
*/
|
||||||
private String getServiceId(String path) {
|
private String getServiceId(String path) {
|
||||||
// /rest/story-service/food/getFoodById
|
|
||||||
path = path.substring(PREFIX_LEN);
|
path = path.substring(PREFIX_LEN);
|
||||||
int index = path.indexOf('/');
|
int index = path.indexOf('/');
|
||||||
path = path.substring(0, index);
|
path = path.substring(0, index);
|
||||||
|
Reference in New Issue
Block a user