Created
October 23, 2022 04:15
-
-
Save Abhi-Codes/34421b7be418dcbe9451320a677b40ce to your computer and use it in GitHub Desktop.
Controller where custom annotation is applied on Request Parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/api/opportunity") | |
@Validated | |
public class OpportunityController { | |
@GetMapping("/vendors/list") | |
public String getVendorpage(@RequestParam(required = false) String term, | |
@RequestParam(required = false) Integer page, @RequestParam(required = false) Integer size, | |
@ValuesAllowed(propName = "orderBy", values = { "OpportunityCount", "OpportunityPublishedCount", "ApplicationCount", | |
"ApplicationsApprovedCount" }) @RequestParam(required = false) String orderBy, @RequestParam(required = false) String sortDir) { | |
return "success"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment