controller

By: Anonymous12/22/202148 views Public Note
//########################################################################################## @GetMapping("/getAllEvent") public ResponseEntity getAllEvent1() throws Exception { ResponseBO responseBO = new ResponseBO(); try { responseBO = event1Service.getAllEvent1(); } catch (Exception e) { e.printStackTrace(); } return new ResponseEntity(responseBO, HttpStatus.OK); } @PostMapping("/saveEvent") public ResponseEntity saveEvent1(@RequestBody Event1 event1) throws Exception { ResponseBO responseBO = null; try { responseBO = event1Service.saveEvent1(event1); } catch (Exception e) { e.printStackTrace(); } return new ResponseEntity(responseBO, HttpStatus.OK); } @RequestMapping(value = "/updateEventByEventId", method = RequestMethod.PUT) public ResponseEntity updateEvent1ByEventid( @RequestBody Event1 event1) throws Exception { ResponseBO responseBO = new ResponseBO(); try { responseBO = event1Service.updateEvent1ByEventid(event1); } catch (Exception e) { e.printStackTrace(); } return new ResponseEntity(responseBO,HttpStatus.OK); } @RequestMapping(value = "/deleteEventByEventId/{eventId}", method = RequestMethod.DELETE) public ResponseEntity deleteEvent1ByEventid(@PathVariable("eventId") Integer eventId) throws Exception { ResponseBO responseBO = new ResponseBO(); try { responseBO = event1Service.deleteEvent1ByEventid(eventId); } catch (Exception e) { e.printStackTrace(); } return new ResponseEntity(responseBO,HttpStatus.OK); }

Want to create your own notes?

Join thousands of users writing securely on ProNotepad.