This commit is contained in:
tanghc
2019-09-11 09:40:35 +08:00
parent d32d3931a1
commit cb03f5a554
6 changed files with 61 additions and 1 deletions

View File

@@ -46,6 +46,9 @@ public class ServiceRouteController {
protected ServiceRouteInfo getServiceRouteInfo(HttpServletRequest request, HttpServletResponse response) {
String serviceId = environment.getProperty("spring.application.name");
if (serviceId == null) {
throw new IllegalArgumentException("未指定spring.application.name参数");
}
ApiMetaBuilder apiMetaBuilder = getApiMetaBuilder();
ServiceApiInfo serviceApiInfo = apiMetaBuilder.getServiceApiInfo(serviceId, requestMappingHandlerMapping);
ServiceRouteInfoBuilder serviceRouteInfoBuilder = new ServiceRouteInfoBuilder(environment);