Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Programming
→
ASP Dot net Interview Questions in Programming
→
What are the important annotation for Spring rest?...
1.
What are the important annotation for Spring rest? What is the use case of this annotation?
Answer»
@RestController:
Define at class level, so that spring
CONTAINER
will consider as RestENd point
@RequestMapping(value = "/
PRODUCTS
"):
Define the REST URL for method level.
@PathVariable:
Define as a method argument
@RequestBody:
Define as a method argument
@ResponseEntity:
To convert the domain object into the response format
@hasAuthority:
To grant the access of corresponding endpoints
@GetMapping:
To make endpoint compatible for get request.
@PostMapping:
To make endpoint compatible for
POST
request.
@PutMapping:
To make endpoint compatible for put request.
@DeleteMapping:
To make endpoint compatible for delete request.
@ResponseStatus:
To generate the
HTTP
status.
@ResponseBody:
To Generate the response message.
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
What is ELK stack?
What is Cloud Foundry?
What is Reactive Programming? How it can be enabled using Spring?
What is Service Discovery and how it can be enabled in Spring Boot?
What is Hystrix and how it can be implemented in the Spring Boot application?
What is Spring Cloud Contract?
What is Microservices? How it is different from monolithic applications?
What is @Autowired annotation? How is @Qualifier used with it?
Explain the difference between @Controller and @RestController annotation?
What is HATEOS in RESTful applications?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies