You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by mi...@apache.org on 2018/10/17 02:06:02 UTC
[incubator-dubbo-ops] branch develop updated: Update
ServiceController.java (#138)
This is an automated email from the ASF dual-hosted git repository.
min pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git
The following commit(s) were added to refs/heads/develop by this push:
new d1153c4 Update ServiceController.java (#138)
d1153c4 is described below
commit d1153c4285b770dbc54943767af4ccfb6d8c25c9
Author: SineLu <43...@users.noreply.github.com>
AuthorDate: Wed Oct 17 10:05:57 2018 +0800
Update ServiceController.java (#138)
* Update ServiceController.java
@RequestParam to @PathVariable
* Update ServiceController.java
@RequestParam to @PathVariable
---
.../main/java/org/apache/dubbo/admin/controller/ServiceController.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java b/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java
index 7629877..c72c73e 100644
--- a/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java
+++ b/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/controller/ServiceController.java
@@ -26,6 +26,7 @@ import org.apache.dubbo.admin.governance.service.ProviderService;
import org.apache.dubbo.admin.registry.common.domain.Consumer;
import org.apache.dubbo.admin.registry.common.domain.Provider;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@@ -85,7 +86,7 @@ public class ServiceController {
}
@RequestMapping("/{app}/{service}")
- public ServiceDetailDTO serviceDetail(@RequestParam String app, @RequestParam String service) {
+ public ServiceDetailDTO serviceDetail(@PathVariable String app, @PathVariable String service) {
List<Provider> providers = providerService.findByAppandService(app, service);
List<Consumer> consumers = consumerService.findByAppandService(app, service);