removed code smells by replacing annotation 61/106261/1
authorRupinder <rupinsi1@in.ibm.com>
Mon, 20 Apr 2020 10:49:39 +0000 (16:19 +0530)
committerRupinder <rupinsi1@in.ibm.com>
Mon, 20 Apr 2020 10:49:47 +0000 (16:19 +0530)
Issue-ID: PORTAL-865
Change-Id: I5981230a56cdc87dc4a99518a7d8604f2faa122e
Signed-off-by: Rupinder<rupinsi1@in.ibm.com>
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AuditLogController.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/AuxApiRequestMapperController.java
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/BEPropertyReaderController.java

index cff8245..ae64be1 100644 (file)
@@ -48,6 +48,7 @@ import org.onap.portalapp.validation.SecureString;
 import org.slf4j.MDC;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
@@ -91,7 +92,7 @@ public class AuditLogController extends EPRestrictedBaseController {
         * @param comment
         *            Comment
         */
-       @RequestMapping(value = "/store", method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = "/store", produces = "application/json")
        public void auditLog(HttpServletRequest request, @RequestParam String affectedAppId, @RequestParam String type,
                        @RequestParam String comment) {
                logger.debug(EELFLoggerDelegate.debugLogger, "auditLog: appId {}, type {}, comment {}", affectedAppId, type,
index 969605c..4583cc3 100644 (file)
@@ -85,6 +85,10 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
@@ -107,7 +111,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        private ManifestService manifestService;
 
        @ApiOperation(value = "Gets user roles for an application which is upgraded to newer version.", response = String.class, responseContainer = "List")
-       @RequestMapping(value = { "/v3/user/{loginId}" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/user/{loginId}" }, produces = "application/json")
        public String getUser(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("loginId") String loginId) throws Exception {
                if (loginId!=null){
@@ -129,7 +133,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets roles for an application which is upgraded to newer version.", response = CentralV2Role.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/roles" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/roles" }, produces = "application/json")
        public List<CentralV2Role> getRoles(HttpServletRequest request, HttpServletResponse response) throws Exception {
                Map<String, Object> res = getMethod(request, response);
                request.getMethod();
@@ -144,7 +148,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Saves role for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/role" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/role" }, produces = "application/json")
        public PortalRestResponse<String> saveRole(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody Role role) throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -159,7 +163,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Gets v2 role information for an application which is upgraded to newer version.", response = CentralV2Role.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/role/{role_id}" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/role/{role_id}" }, produces = "application/json")
        public CentralV2Role getRoleInfo(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("role_id") Long roleId) throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -175,7 +179,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets all active Users of application", response = String.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/users" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/users" }, produces = "application/json")
        public List<EcompUser> getUsersOfApplication(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -190,7 +194,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets all role functions for an application which is upgraded to newer version.", response = CentralV2RoleFunction.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/functions" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/functions" }, produces = "application/json")
        public List<CentralV2RoleFunction> getRoleFunctionsList(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -204,7 +208,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Gets role information for an application provided by function code.", response = CentralV2RoleFunction.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/function/{code}" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/function/{code}" }, produces = "application/json")
        public CentralV2RoleFunction getRoleFunction(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("code") String code) throws Exception {
                if (code!=null){
@@ -225,7 +229,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Saves role function for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/roleFunction" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/roleFunction" }, produces = "application/json")
        public PortalRestResponse<String> saveRoleFunction(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody String roleFunc) throws Exception {
                if (roleFunc!=null){
@@ -250,7 +254,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Deletes role function for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/roleFunction/{code}" }, method = RequestMethod.DELETE, produces = "application/json")
+       @DeleteMapping(value = { "/v3/roleFunction/{code}" }, produces = "application/json")
        public PortalRestResponse<String> deleteRoleFunction(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("code") String code) throws Exception {
                PortalRestResponse<String> result = null;
@@ -273,7 +277,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "deletes  roles for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/deleteRole/{roleId}" }, method = RequestMethod.DELETE, produces = "application/json")
+       @DeleteMapping(value = { "/v3/deleteRole/{roleId}" }, produces = "application/json")
        public PortalRestResponse<String> deleteRole(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("roleId") Long roleId) throws Exception {
                PortalRestResponse<String> result = null;
@@ -289,7 +293,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets active roles for an application.", response = CentralV2Role.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/activeRoles" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/activeRoles" }, produces = "application/json")
        public List<CentralV2Role> getActiveRoles(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                List<CentralV2Role> cenRole = null;
@@ -303,7 +307,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Gets ecompUser of an application.", response = CentralUser.class, responseContainer = "List")
-       @RequestMapping(value = { "/v4/user/{loginId}" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v4/user/{loginId}" }, produces = "application/json")
        public String getEcompUser(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("loginId") String loginId) throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -326,7 +330,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets user ecomp role for an application.", response = CentralUser.class, responseContainer = "List")
-       @RequestMapping(value = { "/v4/roles" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v4/roles" }, produces = "application/json")
        public List<EcompRole> getEcompRolesOfApplication(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -340,8 +344,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Gets session slot-check interval, a duration in milliseconds.", response = Integer.class)
-       @RequestMapping(value = {
-                       "/v3/getSessionSlotCheckInterval" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = {
+                       "/v3/getSessionSlotCheckInterval" }, produces = "application/json")
        public Integer getSessionSlotCheckInterval(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Map<String, Object> res = getMethod(request, response);
@@ -377,7 +381,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Gets javascript with functions that support gathering and reporting web analytics.", response = String.class)
-       @RequestMapping(value = { "/v3/analytics" }, method = RequestMethod.GET, produces = "application/javascript")
+       @GetMapping(value = { "/v3/analytics" }, produces = "application/javascript")
        public String getAnalyticsScript(HttpServletRequest request, HttpServletResponse response) throws Exception {
                Map<String, Object> res = getMethod(request, response);
                String ans = null;
@@ -389,7 +393,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
                return ans;
        }
 
-       @RequestMapping(value = { "/v3/storeAnalytics" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/storeAnalytics" }, produces = "application/json")
        @ResponseBody
        @ApiOperation(value = "Accepts data from partner applications with web analytics data.", response = PortalAPIResponse.class)
        public PortalAPIResponse storeAnalyticsScript(HttpServletRequest request, HttpServletResponse response,
@@ -413,8 +417,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload functions for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = {
-                       "/v3/upload/portal/functions" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = {
+                       "/v3/upload/portal/functions" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadFunctions(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Optional<PortalRestResponse<String>> result = null;
@@ -434,7 +438,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload roles for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/upload/portal/roles" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/upload/portal/roles" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadRoles(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Optional<PortalRestResponse<String>> result;
@@ -454,8 +458,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload role functions for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = {
-                       "/v3/upload/portal/roleFunctions" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = {
+                       "/v3/upload/portal/roleFunctions" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadRoleFunctions(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Optional<PortalRestResponse<String>> result;
@@ -475,8 +479,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload user roles for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = {
-                       "/v3/upload/portal/userRoles" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = {
+                       "/v3/upload/portal/userRoles" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadUserRoles(HttpServletRequest request, HttpServletResponse response)
                        throws Exception {
                Optional<PortalRestResponse<String>> result;
@@ -497,8 +501,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload users for renamed role of an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = {
-                       "/v3/upload/portal/userRole/{roleId}" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = {
+                       "/v3/upload/portal/userRole/{roleId}" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadUsersSingleRole(HttpServletRequest request,
                        HttpServletResponse response, @PathVariable Long roleId) throws Exception {
                Optional<PortalRestResponse<String>> result = null;
@@ -518,8 +522,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload functions for an partner application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = {
-                       "/v3/upload/partner/functions" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = {
+                       "/v3/upload/partner/functions" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadPartnerFunctions(HttpServletRequest request,
                        HttpServletResponse response) throws Exception {
                Optional<PortalRestResponse<String>> result = null;
@@ -540,7 +544,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        // not using
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload roles for an partner application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/upload/partner/roles" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/upload/partner/roles" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadPartnerRoles(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody List<Role> upload) throws Exception {
                Optional<PortalRestResponse<String>> result = null;
@@ -560,8 +564,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Bulk upload role functions for an partner application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = {
-                       "/v3/upload/partner/roleFunctions" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = {
+                       "/v3/upload/partner/roleFunctions" }, produces = "application/json")
        public PortalRestResponse<String> bulkUploadPartnerRoleFunctions(HttpServletRequest request,
                        HttpServletResponse response) throws Exception {
                Optional<PortalRestResponse<String>> result = null;
@@ -581,7 +585,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets all functions along with global functions", response = List.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/menuFunctions" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/menuFunctions" }, produces = "application/json")
        public List<String> getMenuFunctions(HttpServletRequest request, HttpServletResponse response) throws Exception {
                List<String> functionsList = null;
                Map<String, Object> res = getMethod(request, response);
@@ -796,7 +800,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Creates an application user with the specified roles.", response = PortalRestResponse.class)
-       @RequestMapping(value = { "/v3/userProfile" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/userProfile" }, produces = "application/json")
        public PortalRestResponse<String> postUserProfile(HttpServletRequest request,
                        @RequestBody ExternalSystemUser extSysUser, HttpServletResponse response) {
 
@@ -818,7 +822,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Updates an application user to have only the specified roles.", response = PortalRestResponse.class)
-       @RequestMapping(value = { "/v3/userProfile" }, method = RequestMethod.PUT, produces = "application/json")
+       @PutMapping(value = { "/v3/userProfile" }, produces = "application/json")
        public PortalRestResponse<String> putUserProfile(HttpServletRequest request,
                        @RequestBody ExternalSystemUser extSysUser, HttpServletResponse response) {
 
@@ -840,7 +844,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Processes a request to delete one or more application roles for one      specified user who has roles.", response = PortalRestResponse.class)
-       @RequestMapping(value = { "/v3/userProfile" }, method = RequestMethod.DELETE, produces = "application/json")
+       @DeleteMapping(value = { "/v3/userProfile" }, produces = "application/json")
        public PortalRestResponse<String> deleteUserProfile(HttpServletRequest request,
                        @RequestBody ExternalSystemUser extSysUser, HttpServletResponse response) {
 
@@ -885,7 +889,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Creates a new user as a Portal administrator.", response = PortalRestResponse.class)
-       @RequestMapping(value = "/v3/portalAdmin", method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = "/v3/portalAdmin", produces = "application/json")
        @ResponseBody
        public PortalRestResponse<String> postPortalAdmin(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody EPUser epUser) {
@@ -907,7 +911,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Gets the specified application that is on-boarded in Portal.", response = OnboardingApp.class)
-       @RequestMapping(value = { "/v3/onboardApp/{appId}" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/onboardApp/{appId}" }, produces = "application/json")
        @ResponseBody
        public OnboardingApp getOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("appId") Long appId) {
@@ -923,7 +927,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Adds a new application to Portal.", response = PortalRestResponse.class)
-       @RequestMapping(value = { "/v3/onboardApp" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/onboardApp" }, produces = "application/json")
        @ResponseBody
        public PortalRestResponse<String> postOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,
                        @RequestBody OnboardingApp newOnboardApp) {
@@ -947,7 +951,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Updates information about an on-boarded application in Portal.", response = PortalRestResponse.class)
-       @RequestMapping(value = { "/v3/onboardApp/{appId}" }, method = RequestMethod.PUT, produces = "application/json")
+       @PutMapping(value = { "/v3/onboardApp/{appId}" }, produces = "application/json")
        @ResponseBody
        public PortalRestResponse<String> putOnboardAppExternal(HttpServletRequest request, HttpServletResponse response,
                        @PathVariable("appId") Long appId, @RequestBody OnboardingApp oldOnboardApp) {
@@ -969,7 +973,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
 
        @ApiOperation(value = "Creates a Portal user notification for roles identified in the content from an external application.", response = PortalAPIResponse.class)
-       @RequestMapping(value = { "/v3/publishNotification" }, method = RequestMethod.POST, produces = "application/json")
+       @PostMapping(value = { "/v3/publishNotification" }, produces = "application/json")
        @ResponseBody
        public PortalAPIResponse publishNotification(HttpServletRequest request,
                        @RequestBody EpNotificationItem notificationItem, HttpServletResponse response) {
@@ -990,7 +994,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets favorite items within the functional menu for the current user.", response = FavoritesFunctionalMenuItemJson.class, responseContainer = "List")
-       @RequestMapping(value = { "/v3/getFavorites" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/getFavorites" }, produces = "application/json")
        public List<FavoritesFunctionalMenuItemJson> getFavoritesForUser(HttpServletRequest request,
                        HttpServletResponse response) throws Exception {
                List<FavoritesFunctionalMenuItemJson> favorites = null;
@@ -1005,8 +1009,8 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        @SuppressWarnings("unchecked")
        @ApiOperation(value = "Gets functional menu items appropriate for the current user.", response = FunctionalMenuItem.class, responseContainer = "List")
-       @RequestMapping(value = {
-                       "/v3/functionalMenuItemsForUser" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = {
+                       "/v3/functionalMenuItemsForUser" }, produces = "application/json")
        public List<FunctionalMenuItem> getFunctionalMenuItemsForUser(HttpServletRequest request,
                        HttpServletResponse response) throws Exception {
                List<FunctionalMenuItem> fnMenuItems = null;
@@ -1021,7 +1025,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
 
        
        @ApiOperation(value = "Gets MechId roles", response = String.class, responseContainer = "List")
-       @RequestMapping(value = { "/v3/systemUser" }, method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = { "/v3/systemUser" }, produces = "application/json")
        public List<AAFPermission> getSystemUserPerms(HttpServletRequest request, HttpServletResponse response) throws Exception {
                List<AAFPermission> permsList = null;
                Map<String, Object> res = getMethod(request, response);
@@ -1034,7 +1038,7 @@ public class AuxApiRequestMapperController implements ApplicationContextAware, B
        }
        
        @ApiOperation(value = "Update role description in external auth system for an application.", response = PortalRestResponse.class, responseContainer = "Json")
-       @RequestMapping(value = { "/v3/update/app/roleDescription" }, method = RequestMethod.PUT, produces = "application/json")
+       @PutMapping(value = { "/v3/update/app/roleDescription" }, produces = "application/json")
        public  PortalRestResponse<String> updateAppRoleDescription(HttpServletRequest request, HttpServletResponse response) throws Exception {
                PortalRestResponse<String> result = null;
                Map<String, Object> res = getMethod(request, response);
index 51b1d48..4ebe6b5 100644 (file)
@@ -40,6 +40,7 @@ package org.onap.portalapp.portal.controller;
 import javax.servlet.http.HttpServletRequest;
 
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
@@ -56,7 +57,7 @@ public class BEPropertyReaderController extends FusionBaseController{
 
     private static final EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(BEPropertyReaderController.class);
 
-       @RequestMapping(value = "/readProperty", method = RequestMethod.GET, produces = "application/json")
+       @GetMapping(value = "/readProperty", produces = "application/json")
        public PortalRestResponse<BEProperty> readProperty(HttpServletRequest request, @RequestParam String key) {
                try {
                        return new PortalRestResponse<>(PortalRestStatusEnum.OK, "success", new BEProperty(key, SystemProperties.getProperty(key)));