From aa5b3d37be6b625c7f97bc9f8c53d9a1bc2151ff Mon Sep 17 00:00:00 2001 From: Maxim Gorbunkov Date: Tue, 5 Jul 2016 11:30:15 +0400 Subject: [PATCH] PL-6730 REST API URLs changed --- modules/global/src/com/haulmont/cuba/app-component.xml | 2 ++ .../haulmont/restapi/controllers/EntitiesController.java | 2 +- .../haulmont/restapi/controllers/OAuthTokenController.java | 2 +- .../haulmont/restapi/controllers/QueriesController.java | 2 +- modules/rest-api/src/rest-api-security-spring.xml | 7 ++++--- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/global/src/com/haulmont/cuba/app-component.xml b/modules/global/src/com/haulmont/cuba/app-component.xml index a50d159528..69b266209d 100644 --- a/modules/global/src/com/haulmont/cuba/app-component.xml +++ b/modules/global/src/com/haulmont/cuba/app-component.xml @@ -44,6 +44,8 @@ + + diff --git a/modules/rest-api/src/com/haulmont/restapi/controllers/EntitiesController.java b/modules/rest-api/src/com/haulmont/restapi/controllers/EntitiesController.java index 3b8f843639..29247b8656 100644 --- a/modules/rest-api/src/com/haulmont/restapi/controllers/EntitiesController.java +++ b/modules/rest-api/src/com/haulmont/restapi/controllers/EntitiesController.java @@ -47,7 +47,7 @@ import java.util.UUID; * Controller that performs CRUD entity operations */ @RestController -@RequestMapping(value = "/entities", produces = "application/json; charset=UTF-8") +@RequestMapping(value = "/api/entities", produces = "application/json; charset=UTF-8") public class EntitiesController { @Inject diff --git a/modules/rest-api/src/com/haulmont/restapi/controllers/OAuthTokenController.java b/modules/rest-api/src/com/haulmont/restapi/controllers/OAuthTokenController.java index 7767eefe32..7853cac1d9 100644 --- a/modules/rest-api/src/com/haulmont/restapi/controllers/OAuthTokenController.java +++ b/modules/rest-api/src/com/haulmont/restapi/controllers/OAuthTokenController.java @@ -40,7 +40,7 @@ public class OAuthTokenController { @Inject private OAuthTokenRevoker oAuthTokenRevoker; - @RequestMapping(value = "/oauth/revoke", method = RequestMethod.POST) + @RequestMapping(value = "/api/oauth/revoke", method = RequestMethod.POST) public ResponseEntity revokeToken(@RequestParam("token") final String token, @RequestParam(value = "token_hint", required = false) final String tokenHint, final Principal principal) { log.info("POST {}, /oauth/revoke; token = {}, tokenHint = {}", token, tokenHint); diff --git a/modules/rest-api/src/com/haulmont/restapi/controllers/QueriesController.java b/modules/rest-api/src/com/haulmont/restapi/controllers/QueriesController.java index 7c8c965237..25fe0a116d 100644 --- a/modules/rest-api/src/com/haulmont/restapi/controllers/QueriesController.java +++ b/modules/rest-api/src/com/haulmont/restapi/controllers/QueriesController.java @@ -42,7 +42,7 @@ import java.util.*; * Controller that is used for operations with predefined JPQL queries */ @RestController -@RequestMapping("/queries") +@RequestMapping("/api/queries") public class QueriesController { @Inject diff --git a/modules/rest-api/src/rest-api-security-spring.xml b/modules/rest-api/src/rest-api-security-spring.xml index 5caef92abe..b6fdcffa1a 100644 --- a/modules/rest-api/src/rest-api-security-spring.xml +++ b/modules/rest-api/src/rest-api-security-spring.xml @@ -34,7 +34,7 @@ - @@ -64,6 +64,7 @@ @@ -85,7 +86,7 @@ - @@ -96,7 +97,7 @@ -