예제 #1
0
 /** POST /servicess -> Create a new services. */
 @RequestMapping(
     value = "/servicess",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Services> createServices(@Valid @RequestBody Services services)
     throws URISyntaxException {
   log.debug("REST request to save Services : {}", services);
   if (services.getId() != null) {
     return ResponseEntity.badRequest()
         .headers(
             HeaderUtil.createFailureAlert(
                 "services", "idexists", "A new services cannot already have an ID"))
         .body(null);
   }
   Services result = servicesService.save(services);
   return ResponseEntity.created(new URI("/api/servicess/" + result.getId()))
       .headers(HeaderUtil.createEntityCreationAlert("services", result.getId().toString()))
       .body(result);
 }
예제 #2
0
 /** POST /education_levels -> Create a new education_level. */
 @RequestMapping(
     value = "/education_levels",
     method = RequestMethod.POST,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Education_level> createEducation_level(
     @Valid @RequestBody Education_level education_level) throws URISyntaxException {
   log.debug("REST request to save Education_level : {}", education_level);
   if (education_level.getId() != null) {
     return ResponseEntity.badRequest()
         .headers(
             HeaderUtil.createFailureAlert(
                 "education_level", "idexists", "A new education_level cannot already have an ID"))
         .body(null);
   }
   Education_level result = education_levelService.save(education_level);
   return ResponseEntity.created(new URI("/api/education_levels/" + result.getId()))
       .headers(HeaderUtil.createEntityCreationAlert("education_level", result.getId().toString()))
       .body(result);
 }