From c6cd3ce527614b28d6c6803807c552407eb5e5ba Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Thu, 16 Nov 2023 05:28:40 +0000 Subject: [PATCH] feat : Remove implicit web annotation names --- .../web/controllers/CustomerController.java | 20 +---- .../web/controllers/ClientController.java | 12 +-- .../web/controllers/CustomerController.java | 20 +---- .../web/controller/RestaurantController.java | 12 ++- .../web/controller/SearchController.java | 90 +++++++++---------- .../web/controllers/RestaurantController.java | 20 +---- .../web/controllers/SearchController.java | 90 +++++++++---------- .../web/controllers/UserController.java | 20 +---- .../controllers/PostCommentController.java | 12 +-- .../web/controllers/PostController.java | 12 +-- .../web/controllers/TagController.java | 12 +-- .../proxy/web/controllers/PostController.java | 20 +---- .../web/controllers/PostController.java | 20 +---- .../web/controller/PostController.java | 10 +-- .../custom/sequence/web/api/CustomerAPI.java | 2 +- .../web/controllers/CustomerController.java | 20 +---- .../web/controllers/OrderController.java | 20 +---- .../web/controllers/CustomerController.java | 12 +-- .../web/controllers/ActorController.java | 48 +++------- .../controller/DetailsController.java | 2 +- .../web/controllers/CustomerController.java | 23 ++--- .../web/controllers/OrderController.java | 20 +---- .../web/controllers/OrderItemController.java | 20 +---- .../web/controllers/ActorController.java | 12 +-- .../web/controllers/MovieController.java | 12 +-- .../ReactiveCommentsController.java | 12 +-- .../controllers/ReactivePostController.java | 10 +-- 27 files changed, 187 insertions(+), 396 deletions(-) diff --git a/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/web/controllers/CustomerController.java b/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/web/controllers/CustomerController.java index dd9693cf5..85c519d2a 100644 --- a/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/web/controllers/CustomerController.java +++ b/batch-boot-jpa-sample/src/main/java/com/example/bootbatchjpa/web/controllers/CustomerController.java @@ -28,25 +28,13 @@ public class CustomerController { @GetMapping public PagedResult getAllCustomers( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return customerService.findAllCustomers(pageNo, pageSize, sortBy, sortDir); } diff --git a/boot-api-archunit-sample/src/main/java/com/example/archunit/web/controllers/ClientController.java b/boot-api-archunit-sample/src/main/java/com/example/archunit/web/controllers/ClientController.java index ebf3f2182..291f74e0b 100644 --- a/boot-api-archunit-sample/src/main/java/com/example/archunit/web/controllers/ClientController.java +++ b/boot-api-archunit-sample/src/main/java/com/example/archunit/web/controllers/ClientController.java @@ -32,14 +32,10 @@ public class ClientController { @GetMapping public ResponseEntity> getAllClients( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindClientsQuery findClientsQuery = new FindClientsQuery(pageNo, pageSize, sortBy, sortDir); return ResponseEntity.ok(clientService.findAllClients(findClientsQuery)); } diff --git a/boot-choas-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java b/boot-choas-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java index 32b1c7df4..5125b4403 100644 --- a/boot-choas-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java +++ b/boot-choas-monkey/src/main/java/com/example/choasmonkey/web/controllers/CustomerController.java @@ -30,25 +30,13 @@ public class CustomerController { @GetMapping public CustomerResponse getAllCustomers( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return customerService.findAllCustomers(pageNo, pageSize, sortBy, sortDir); } diff --git a/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/RestaurantController.java b/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/RestaurantController.java index d995b3882..062277379 100644 --- a/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/RestaurantController.java +++ b/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/RestaurantController.java @@ -32,15 +32,14 @@ public class RestaurantController { @GetMapping public Mono>> findAllRestaurants( - @Valid @RequestParam(value = "limit", defaultValue = "10") @Size(max = 999) - Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @Valid @RequestParam(defaultValue = "10") @Size(max = 999) Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return restaurantService.findAllRestaurants(offset, limit).map(ResponseEntity::ok); } @GetMapping("/name/{restaurantName}") public Mono> findRestaurantByName( - @PathVariable("restaurantName") String restaurantName) { + @PathVariable String restaurantName) { return restaurantService .findByRestaurantName(restaurantName) .map(ResponseEntity::ok) @@ -48,8 +47,7 @@ public Mono> findRestaurantByName( } @GetMapping("/{restaurantId}") - public Mono> findRestaurantById( - @PathVariable("restaurantId") Long restaurantId) { + public Mono> findRestaurantById(@PathVariable Long restaurantId) { return restaurantService .findByRestaurantId(restaurantId) .map(ResponseEntity::ok) @@ -72,7 +70,7 @@ public Mono> totalCount() { @PutMapping("/{restaurantId}/grades/") public Mono> addNotesToRestaurant( - @PathVariable("restaurantId") Long restaurantId, @RequestBody Grades grades) { + @PathVariable Long restaurantId, @RequestBody Grades grades) { return restaurantService.addGrade(grades, restaurantId).map(ResponseEntity::ok); } diff --git a/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/SearchController.java b/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/SearchController.java index dd9d95304..f24d08f39 100644 --- a/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/SearchController.java +++ b/boot-mongodb-elasticsearch/src/main/java/com/example/mongoes/web/controller/SearchController.java @@ -24,17 +24,17 @@ public class SearchController { @GetMapping("/search/borough") public Mono>> searchPhrase( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService.searchMatchBorough(query, offset, limit).map(ResponseEntity::ok); } @GetMapping("/search/multi") public Mono>> searchMulti( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset, + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset, @RequestParam(value = "prefix_phrase_enabled", defaultValue = "false") Boolean prefixPhraseEnabled) { return searchService @@ -44,27 +44,27 @@ public Mono>> searchMulti( @GetMapping("/search/term/borough") public Mono>> searchTermForBorough( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService.termQueryForBorough(query, offset, limit).map(ResponseEntity::ok); } @GetMapping("/search/terms") public Mono>> searchTerms( @RequestParam("query") List queries, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService.termsQueryForBorough(queries, offset, limit).map(ResponseEntity::ok); } @GetMapping("/search/must/bool") public Mono>> searchBoolMust( - @RequestParam("borough") String borough, - @RequestParam("cuisine") String cuisine, - @RequestParam("name") String name, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String borough, + @RequestParam String cuisine, + @RequestParam String name, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService .queryBoolWithMust(borough, cuisine, name, offset, limit) .map(ResponseEntity::ok); @@ -72,11 +72,11 @@ public Mono>> searchBoolMust( @GetMapping("/search/should/bool") public Mono>> searchBoolShould( - @RequestParam("borough") String borough, - @RequestParam("cuisine") String cuisine, - @RequestParam("name") String name, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String borough, + @RequestParam String cuisine, + @RequestParam String name, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService .queryBoolWithShould(borough, cuisine, name, offset, limit) .map(ResponseEntity::ok); @@ -84,25 +84,25 @@ public Mono>> searchBoolShould( @GetMapping("/search/wildcard/borough") public Mono>> searchBoolShould( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService.wildcardSearch(query, offset, limit).map(ResponseEntity::ok); } @GetMapping("/search/regexp/borough") public Mono>> searchRegularExpression( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService.regExpSearch(query, offset, limit).map(ResponseEntity::ok); } @GetMapping("/search/simple") public Mono>> searchSimpleQueryForBoroughAndCuisine( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService .searchSimpleQueryForBoroughAndCuisine(query, offset, limit) .map(ResponseEntity::ok); @@ -110,10 +110,10 @@ public Mono>> searchSimpleQueryForBoroughA @GetMapping("/search/restaurant/range") public Mono>> searchRestaurantIdRange( - @RequestParam("lowerLimit") Long lowerLimit, - @RequestParam("upperLimit") Long upperLimit, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam Long lowerLimit, + @RequestParam Long upperLimit, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService .searchRestaurantIdRange(lowerLimit, upperLimit, offset, limit) .map(ResponseEntity::ok); @@ -121,10 +121,10 @@ public Mono>> searchRestaurantIdRange( @GetMapping("/search/date/range") public Mono>> searchDateRange( - @RequestParam("fromDate") String fromDate, - @RequestParam("toDate") String toDate, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String fromDate, + @RequestParam String toDate, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return searchService .searchDateRange(fromDate, toDate, offset, limit) .map(ResponseEntity::ok); @@ -132,14 +132,12 @@ public Mono>> searchDateRange( @GetMapping("/search/aggregate") public Mono> aggregateSearch( - @RequestParam(name = "searchKeyword") String searchKeyword, - @RequestParam(name = "fieldNames") List fieldNames, - @RequestParam(required = false, name = "limit", defaultValue = "15") Integer limit, - @RequestParam(required = false, name = "offset", defaultValue = "0") Integer offset, - @RequestParam(required = false, defaultValue = "DESC", name = "sortOrder") - String sortOrder, - @RequestParam(required = false, defaultValue = "restaurant_id", name = "sortFields") - String... sortFields) { + @RequestParam String searchKeyword, + @RequestParam List fieldNames, + @RequestParam(required = false, defaultValue = "15") Integer limit, + @RequestParam(required = false, defaultValue = "0") Integer offset, + @RequestParam(required = false, defaultValue = "DESC") String sortOrder, + @RequestParam(required = false, defaultValue = "restaurant_id") String... sortFields) { return searchService .aggregateSearch(searchKeyword, fieldNames, sortOrder, limit, offset, sortFields) .map(ResponseEntity::ok); diff --git a/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/RestaurantController.java b/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/RestaurantController.java index cd64f157f..555888509 100644 --- a/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/RestaurantController.java +++ b/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/RestaurantController.java @@ -31,25 +31,13 @@ public RestaurantController(RestaurantService restaurantService) { @GetMapping public PagedResult getAllRestaurants( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return restaurantService.findAllRestaurants(pageNo, pageSize, sortBy, sortDir); } diff --git a/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/SearchController.java b/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/SearchController.java index 2e63ce2b9..c7c715f20 100644 --- a/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/SearchController.java +++ b/boot-opensearch-sample/src/main/java/com/example/opensearch/web/controllers/SearchController.java @@ -23,17 +23,17 @@ public SearchController(RestaurantSearchService searchService) { @GetMapping("/search/borough") public ResponseEntity> searchPhrase( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok(searchService.findByBorough(query, offset, limit)); } @GetMapping("/search/multi") public ResponseEntity> searchMulti( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset, + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset, @RequestParam(value = "prefix_phrase_enabled", defaultValue = "false") Boolean prefixPhraseEnabled) { return ResponseEntity.ok( @@ -42,96 +42,94 @@ public ResponseEntity> searchMulti( @GetMapping("/search/term/borough") public ResponseEntity> searchTermForBorough( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok(searchService.termQueryForBorough(query, offset, limit)); } @GetMapping("/search/terms") public ResponseEntity> searchTerms( @RequestParam("query") List queries, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok(searchService.termsQueryForBorough(queries, offset, limit)); } @GetMapping("/search/must/bool") public ResponseEntity> queryBoolWithMust( - @RequestParam("borough") String borough, - @RequestParam("cuisine") String cuisine, - @RequestParam("name") String name, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String borough, + @RequestParam String cuisine, + @RequestParam String name, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok( searchService.queryBoolWithMust(borough, cuisine, name, offset, limit)); } @GetMapping("/search/should/bool") public ResponseEntity> searchBoolShould( - @RequestParam("borough") String borough, - @RequestParam("cuisine") String cuisine, - @RequestParam("name") String name, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String borough, + @RequestParam String cuisine, + @RequestParam String name, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok( searchService.queryBoolWithShould(borough, cuisine, name, offset, limit)); } @GetMapping("/search/wildcard/borough") public ResponseEntity> searchWildCardBorough( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok(searchService.wildcardSearch(query, offset, limit)); } @GetMapping("/search/regexp/borough") public ResponseEntity> searchRegularExpression( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok(searchService.regExpSearch(query, offset, limit)); } @GetMapping("/search/simple") public ResponseEntity> searchSimpleQueryForBoroughAndCuisine( - @RequestParam("query") String query, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String query, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok( searchService.searchSimpleQueryForBoroughAndCuisine(query, offset, limit)); } @GetMapping("/search/restaurant/range") public ResponseEntity> searchRestaurantIdRange( - @RequestParam("lowerLimit") Long lowerLimit, - @RequestParam("upperLimit") Long upperLimit, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam Long lowerLimit, + @RequestParam Long upperLimit, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok( searchService.searchRestaurantIdRange(lowerLimit, upperLimit, offset, limit)); } @GetMapping("/search/date/range") public ResponseEntity> searchDateRange( - @RequestParam("fromDate") String fromDate, - @RequestParam("toDate") String toDate, - @RequestParam(value = "limit", defaultValue = "10") Integer limit, - @RequestParam(value = "offset", defaultValue = "0") Integer offset) { + @RequestParam String fromDate, + @RequestParam String toDate, + @RequestParam(defaultValue = "10") Integer limit, + @RequestParam(defaultValue = "0") Integer offset) { return ResponseEntity.ok(searchService.searchDateRange(fromDate, toDate, offset, limit)); } @GetMapping("/search/aggregate") public ResponseEntity> aggregateSearch( - @RequestParam(name = "searchKeyword") String searchKeyword, - @RequestParam(name = "fieldNames") List fieldNames, - @RequestParam(required = false, name = "limit", defaultValue = "15") Integer limit, - @RequestParam(required = false, name = "offset", defaultValue = "0") Integer offset, - @RequestParam(required = false, defaultValue = "DESC", name = "sortOrder") - String sortOrder, - @RequestParam(required = false, defaultValue = "id", name = "sortFields") - String... sortFields) { + @RequestParam String searchKeyword, + @RequestParam List fieldNames, + @RequestParam(required = false, defaultValue = "15") Integer limit, + @RequestParam(required = false, defaultValue = "0") Integer offset, + @RequestParam(required = false, defaultValue = "DESC") String sortOrder, + @RequestParam(required = false, defaultValue = "id") String... sortFields) { return ResponseEntity.ok( searchService.aggregateSearch( searchKeyword, fieldNames, sortOrder, limit, offset, sortFields)); diff --git a/boot-rest-docs-sample/src/main/java/com/example/restdocs/web/controllers/UserController.java b/boot-rest-docs-sample/src/main/java/com/example/restdocs/web/controllers/UserController.java index 7a5b68dfe..a6590d33b 100644 --- a/boot-rest-docs-sample/src/main/java/com/example/restdocs/web/controllers/UserController.java +++ b/boot-rest-docs-sample/src/main/java/com/example/restdocs/web/controllers/UserController.java @@ -29,25 +29,13 @@ public class UserController { @GetMapping public PagedResult getAllUsers( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return userService.findAllUsers(pageNo, pageSize, sortBy, sortDir); } diff --git a/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostCommentController.java b/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostCommentController.java index 05b055137..f22941303 100644 --- a/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostCommentController.java +++ b/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostCommentController.java @@ -35,14 +35,10 @@ public class PostCommentController { @GetMapping public PagedResult getAllPostComments( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindQuery findPostCommentsQuery = new FindQuery(pageNo, pageSize, sortBy, sortDir); return postCommentService.findAllPostComments(findPostCommentsQuery); } diff --git a/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostController.java b/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostController.java index 7af4f5a7e..fe3163e93 100644 --- a/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostController.java +++ b/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/PostController.java @@ -35,14 +35,10 @@ public class PostController { @GetMapping public PagedResult getAllPosts( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindQuery findPostsQuery = new FindQuery(pageNo, pageSize, sortBy, sortDir); return postService.findAllPosts(findPostsQuery); } diff --git a/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/TagController.java b/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/TagController.java index a06e569d0..9814b5458 100644 --- a/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/TagController.java +++ b/graphql/boot-graphql-querydsl/src/main/java/com/example/graphql/querydsl/web/controllers/TagController.java @@ -32,14 +32,10 @@ public class TagController { @GetMapping public PagedResult getAllTags( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindQuery findTagsQuery = new FindQuery(pageNo, pageSize, sortBy, sortDir); return tagService.findAllTags(findTagsQuery); } diff --git a/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/web/controllers/PostController.java b/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/web/controllers/PostController.java index 53809f36f..3c5ca5a84 100644 --- a/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/web/controllers/PostController.java +++ b/httpClients/boot-http-proxy/src/main/java/com/example/rest/proxy/web/controllers/PostController.java @@ -28,25 +28,13 @@ public class PostController { @GetMapping public PagedResult getAllPosts( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return postService.findAllPosts(pageNo, pageSize, sortBy, sortDir); } diff --git a/httpClients/boot-rest-template/src/main/java/com/example/rest/template/web/controllers/PostController.java b/httpClients/boot-rest-template/src/main/java/com/example/rest/template/web/controllers/PostController.java index 3fae70d04..154fea9c4 100644 --- a/httpClients/boot-rest-template/src/main/java/com/example/rest/template/web/controllers/PostController.java +++ b/httpClients/boot-rest-template/src/main/java/com/example/rest/template/web/controllers/PostController.java @@ -30,25 +30,13 @@ public PostController(PostService postService) { @GetMapping public PagedResult getAllPosts( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return postService.findAllPosts(pageNo, pageSize, sortBy, sortDir); } diff --git a/httpClients/web-client-webflux/src/main/java/com/example/rest/webclient/web/controller/PostController.java b/httpClients/web-client-webflux/src/main/java/com/example/rest/webclient/web/controller/PostController.java index 720571eb3..a67d0cb08 100644 --- a/httpClients/web-client-webflux/src/main/java/com/example/rest/webclient/web/controller/PostController.java +++ b/httpClients/web-client-webflux/src/main/java/com/example/rest/webclient/web/controller/PostController.java @@ -31,15 +31,9 @@ public class PostController { @GetMapping public Flux getAllPosts( - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return postService.findAllPosts(sortBy, sortDir); } diff --git a/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/api/CustomerAPI.java b/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/api/CustomerAPI.java index 74b04c265..e334d21af 100644 --- a/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/api/CustomerAPI.java +++ b/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/api/CustomerAPI.java @@ -75,7 +75,7 @@ PagedResult getAllCustomers( }) ResponseEntity getCustomerById( @Parameter(name = "id", description = "", required = true, in = ParameterIn.PATH) - @PathVariable("id") + @PathVariable String id); /** diff --git a/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/CustomerController.java b/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/CustomerController.java index cb7318b75..4c30c97b9 100644 --- a/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/CustomerController.java +++ b/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/CustomerController.java @@ -35,25 +35,13 @@ public CustomerController(CustomerService customerService) { @GetMapping @Override public PagedResult getAllCustomers( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return customerService.findAllCustomers(pageNo, pageSize, sortBy, sortDir); } diff --git a/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/OrderController.java b/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/OrderController.java index b48f032c1..c926466ca 100644 --- a/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/OrderController.java +++ b/jpa/boot-data-customsequence/src/main/java/com/example/custom/sequence/web/controllers/OrderController.java @@ -33,25 +33,13 @@ public OrderController(OrderService orderService) { @GetMapping public PagedResult getAllOrders( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return orderService.findAllOrders(pageNo, pageSize, sortBy, sortDir); } diff --git a/jpa/boot-data-envers/src/main/java/com/example/envers/web/controllers/CustomerController.java b/jpa/boot-data-envers/src/main/java/com/example/envers/web/controllers/CustomerController.java index e4b0f48c2..8dcfefb01 100644 --- a/jpa/boot-data-envers/src/main/java/com/example/envers/web/controllers/CustomerController.java +++ b/jpa/boot-data-envers/src/main/java/com/example/envers/web/controllers/CustomerController.java @@ -34,14 +34,10 @@ public class CustomerController { @GetMapping public PagedResult getAllCustomers( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindCustomersQuery findCustomersQuery = new FindCustomersQuery(pageNo, pageSize, sortBy, sortDir); return customerService.findAllCustomers(findCustomersQuery); } diff --git a/jpa/boot-data-keyset-pagination/src/main/java/com/example/keysetpagination/web/controllers/ActorController.java b/jpa/boot-data-keyset-pagination/src/main/java/com/example/keysetpagination/web/controllers/ActorController.java index f3f0d3d7c..b075c5541 100644 --- a/jpa/boot-data-keyset-pagination/src/main/java/com/example/keysetpagination/web/controllers/ActorController.java +++ b/jpa/boot-data-keyset-pagination/src/main/java/com/example/keysetpagination/web/controllers/ActorController.java @@ -33,28 +33,16 @@ public class ActorController { @GetMapping public PagedResult findAllActors( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir, - @RequestParam(value = "lowest", required = false) Long lowest, - @RequestParam(value = "highest", required = false) Long highest) { + @RequestParam(required = false) Long lowest, + @RequestParam(required = false) Long highest) { FindActorsQuery findActorsQuery = new FindActorsQuery(pageNo, pageSize, lowest, highest, sortBy, sortDir); @@ -64,28 +52,16 @@ public PagedResult findAllActors( @PostMapping("/search") public PagedResult searchActors( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir, - @RequestParam(value = "lowest", required = false) Long lowest, - @RequestParam(value = "highest", required = false) Long highest, + @RequestParam(required = false) Long lowest, + @RequestParam(required = false) Long highest, @RequestBody ActorsFilter[] actorsFilters) { FindActorsQuery findActorsQuery = diff --git a/jpa/boot-data-multipledatasources/src/main/java/com/example/multipledatasources/controller/DetailsController.java b/jpa/boot-data-multipledatasources/src/main/java/com/example/multipledatasources/controller/DetailsController.java index 6f4c6f8a3..76c9d311c 100644 --- a/jpa/boot-data-multipledatasources/src/main/java/com/example/multipledatasources/controller/DetailsController.java +++ b/jpa/boot-data-multipledatasources/src/main/java/com/example/multipledatasources/controller/DetailsController.java @@ -14,7 +14,7 @@ public class DetailsController { private final DetailsService detailsService; @GetMapping("/details/{memberId}") - ResponseDto getDetails(@PathVariable("memberId") String memberId) { + ResponseDto getDetails(@PathVariable String memberId) { return detailsService.getDetails(memberId); } } diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/CustomerController.java b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/CustomerController.java index 414cca25c..4a397ae9c 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/CustomerController.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/CustomerController.java @@ -29,25 +29,13 @@ public class CustomerController { @GetMapping public PagedResult getAllCustomers( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return customerService.findAllCustomers(pageNo, pageSize, sortBy, sortDir); } @@ -61,8 +49,7 @@ public ResponseEntity getCustomerById(@PathVariable Long id) { } @GetMapping("/search") - public ResponseEntity searchCustomer( - @RequestParam("firstName") String firstName) { + public ResponseEntity searchCustomer(@RequestParam String firstName) { return customerService .findCustomerByFirstName(firstName) .map(ResponseEntity::ok) diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderController.java b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderController.java index 93f8691dc..1a68e1759 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderController.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderController.java @@ -29,25 +29,13 @@ public class OrderController { @GetMapping public PagedResult getAllOrders( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return orderService.findAllOrders(pageNo, pageSize, sortBy, sortDir); } diff --git a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderItemController.java b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderItemController.java index 328b6e973..8ff898440 100644 --- a/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderItemController.java +++ b/jpa/boot-hibernate2ndlevelcache-sample/src/main/java/com/example/hibernatecache/web/controllers/OrderItemController.java @@ -29,25 +29,13 @@ public class OrderItemController { @GetMapping public PagedResult getAllOrderItems( - @RequestParam( - value = "pageNo", - defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, - @RequestParam( - value = "pageSize", - defaultValue = AppConstants.DEFAULT_PAGE_SIZE, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return orderItemService.findAllOrderItems(pageNo, pageSize, sortBy, sortDir); } diff --git a/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/ActorController.java b/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/ActorController.java index f48825597..bd68391c3 100644 --- a/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/ActorController.java +++ b/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/ActorController.java @@ -34,14 +34,10 @@ public class ActorController { @GetMapping public PagedResult getAllActors( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindActorsQuery findActorsQuery = new FindActorsQuery(pageNo, pageSize, sortBy, sortDir); return actorService.findAllActors(findActorsQuery); } diff --git a/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/MovieController.java b/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/MovieController.java index b91114f6c..482eb1925 100644 --- a/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/MovieController.java +++ b/jpa/boot-jpa-locks/src/main/java/com/example/locks/web/controllers/MovieController.java @@ -34,14 +34,10 @@ public class MovieController { @GetMapping public PagedResult getAllMovies( - @RequestParam(value = "pageNo", defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) - int pageNo, - @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) - int pageSize, - @RequestParam(value = "sortBy", defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) - String sortBy, - @RequestParam(value = "sortDir", defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) - String sortDir) { + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_NUMBER, required = false) int pageNo, + @RequestParam(defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) int pageSize, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { FindMoviesQuery findMoviesQuery = new FindMoviesQuery(pageNo, pageSize, sortBy, sortDir); return movieService.findAllMovies(findMoviesQuery); } diff --git a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactiveCommentsController.java b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactiveCommentsController.java index 2d7ab04dd..98cdb55a7 100644 --- a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactiveCommentsController.java +++ b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactiveCommentsController.java @@ -31,16 +31,10 @@ public class ReactiveCommentsController { @GetMapping("/") public Flux getAllReactiveComments( - @RequestParam(value = "postId") Long postId, - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam Long postId, + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return reactiveCommentsService.findAllReactiveCommentsByPostId(postId, sortBy, sortDir); } diff --git a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactivePostController.java b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactivePostController.java index 6fc5c00b9..4e32c8578 100644 --- a/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactivePostController.java +++ b/r2dbc/boot-r2dbc-sample/src/main/java/com/example/bootr2dbc/web/controllers/ReactivePostController.java @@ -31,15 +31,9 @@ public class ReactivePostController { @GetMapping("/") public Mono>> getAllReactivePosts( - @RequestParam( - value = "sortBy", - defaultValue = AppConstants.DEFAULT_SORT_BY, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_BY, required = false) String sortBy, - @RequestParam( - value = "sortDir", - defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, - required = false) + @RequestParam(defaultValue = AppConstants.DEFAULT_SORT_DIRECTION, required = false) String sortDir) { return reactivePostService .findAllReactivePosts(sortBy, sortDir)