public class PatternServiceRouteMapper extends Object implements ServiceRouteMapper
[rest-service-v1] to
/v1/rest-service/** route service pattern :
"(?.*)-(?v.*$)" route pattern :
"${version}/${name}"
This implementation uses Matcher.replaceFirst so only one match will be
replaced.| Constructor and Description |
|---|
PatternServiceRouteMapper(String servicePattern,
String routePattern) |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(String serviceId)
Use servicePattern to extract groups and routePattern to construct the route.
|
public String apply(String serviceId)
apply in interface ServiceRouteMapperserviceId - service discovered nameCopyright © 2020 Pivotal Software, Inc.. All rights reserved.