diff --git a/apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java b/apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java index 1a6d24b99af6bc9558664c421c32c0af7f6a1ad7..ea6161d50a34b8ababb4636ea5f5d72ed955f293 100644 --- a/apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java +++ b/apollo-adminservice/src/main/java/com/ctrip/framework/apollo/adminservice/controller/AppController.java @@ -48,7 +48,7 @@ public class AppController { return dto; } - @RequestMapping(value = "/apps/{appId}", method = RequestMethod.DELETE) + @RequestMapping(value = "/apps/{appId:.+}", method = RequestMethod.DELETE) public void delete(@PathVariable("appId") String appId, @RequestParam String operator) { App entity = appService.findOne(appId); if (entity == null) { @@ -57,7 +57,7 @@ public class AppController { appService.delete(entity.getId(), operator); } - @RequestMapping(value = "/apps/{appId}", method = RequestMethod.PUT) + @RequestMapping(value = "/apps/{appId:.+}", method = RequestMethod.PUT) public void update(@PathVariable String appId, @RequestBody App app) { if (!Objects.equals(appId, app.getAppId())) { throw new BadRequestException("The App Id of path variable and request body is different"); @@ -78,7 +78,7 @@ public class AppController { return BeanUtils.batchTransform(AppDTO.class, app); } - @RequestMapping(value = "/apps/{appId}", method = RequestMethod.GET) + @RequestMapping(value = "/apps/{appId:.+}", method = RequestMethod.GET) public AppDTO get(@PathVariable("appId") String appId) { App app = appService.findOne(appId); if (app == null) { diff --git a/apollo-assembly/src/main/resources/application.yml b/apollo-assembly/src/main/resources/application.yml index 9aaf3bf8bd54c42b3c34dffa63bca85924fa824d..0a8c46bfe424962ee36a4f1df2a96c752d4dd9a3 100644 --- a/apollo-assembly/src/main/resources/application.yml +++ b/apollo-assembly/src/main/resources/application.yml @@ -3,9 +3,4 @@ spring: active: ${apollo_profile} logging: - level: - org.springframework.cloud: 'DEBUG' file: /opt/logs/100003171/apollo-assembly.log - - - diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java index aa37020a8cddc9190690be5ca4e18b8d0419c14d..c74aba11ab51db5cb9c6e2a24f94487accd50bc6 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/AppController.java @@ -91,7 +91,7 @@ public class AppController { } @PreAuthorize(value = "@permissionValidator.isAppAdmin(#appId)") - @RequestMapping(value = "/{appId}", method = RequestMethod.PUT) + @RequestMapping(value = "/{appId:.+}", method = RequestMethod.PUT) public void update(@PathVariable String appId, @RequestBody AppModel appModel) { if (!Objects.equals(appId, appModel.getAppId())) { throw new BadRequestException("The App Id of path variable and request body is different"); @@ -136,7 +136,7 @@ public class AppController { return ResponseEntity.ok().build(); } - @RequestMapping(value = "/{appId}", method = RequestMethod.GET) + @RequestMapping(value = "/{appId:.+}", method = RequestMethod.GET) public App load(@PathVariable String appId) { return appService.load(appId);