src/main/java/br/ufpa/labes/spm/web/rest/SimpleConResource.java
@PostMapping("/simple-cons")
  public ResponseEntity<SimpleCon> createSimpleCon(@Valid @RequestBody SimpleCon simpleCon)
      throws URISyntaxException {
    log.debug("REST request to save SimpleCon : {}", simpleCon);
    if (simpleCon.getId() != null) {
      throw new BadRequestAlertException(
          "A new simpleCon cannot already have an ID", ENTITY_NAME, "idexists");
    }
    SimpleCon result = simpleConRepository.save(simpleCon);
    return ResponseEntity.created(new URI("/api/simple-cons/" + result.getId()))
        .headers(
            HeaderUtil.createEntityCreationAlert(
                applicationName, true, ENTITY_NAME, result.getId().toString()))
        .body(result);
  }
/**
   * {@code POST /simple-cons} : Create a new simpleCon.
   *
   * @param simpleCon the simpleCon to create.
   * @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new
   *     simpleCon, or with status {@code 400 (Bad Request)} if the simpleCon has already an ID.
   * @throws URISyntaxException if the Location URI syntax is incorrect.
   */
POST /simple-cons : Create a new simpleCon.
@param simpleCon the simpleCon to create.
@return the  ResponseEntity with status  201 (Created) and with body the new
simpleCon, or with status  400 (Bad Request) if the simpleCon has already an ID.
@throws URISyntaxException if the Location URI syntax is incorrect.
POST / simple - cons : Create a new simpleCon . @param simpleCon the simpleCon to create . @return the ResponseEntity with status 201 ( Created ) and with body the new simpleCon or with status 400 ( Bad Request ) if the simpleCon has already an ID . @throws URISyntaxException if the Location URI syntax is incorrect .
@PostMapping("/simple-cons")
  public ResponseEntity<SimpleCon> createSimpleCon(@Valid @RequestBody SimpleCon simpleCon)
      throws URISyntaxException {
    log.debug("REST request to save SimpleCon : {}", simpleCon);
    if (simpleCon.getId() != null) {
      throw new BadRequestAlertException(
          "A new simpleCon cannot already have an ID", ENTITY_NAME, "idexists");
    }
    SimpleCon result = simpleConRepository.save(simpleCon);
    return ResponseEntity.created(new URI("/api/simple-cons/" + result.getId()))
        .headers(
            HeaderUtil.createEntityCreationAlert(
                applicationName, true, ENTITY_NAME, result.getId().toString()))
        .body(result);
  }
@ PostMapping ( "/simple-cons" ) public ResponseEntity < SimpleCon > createSimpleCon ( @ Valid @ RequestBody SimpleCon simpleCon ) throws URISyntaxException { log . debug ( "REST request to save SimpleCon : {}" , simpleCon ) ; if ( simpleCon . getId ( ) != null ) { throw new BadRequestAlertException ( "A new simpleCon cannot already have an ID" , ENTITY_NAME , "idexists" ) ; } SimpleCon result = simpleConRepository . save ( simpleCon ) ; return ResponseEntity . created ( new URI ( "/api/simple-cons/" + result . getId ( ) ) ) . headers ( HeaderUtil . createEntityCreationAlert ( applicationName , true , ENTITY_NAME , result . getId ( ) . toString ( ) ) ) . body ( result ) ; }
{@code POST /simple-cons} : Create a new simpleCon.
{ @code POST / simple - cons } : Create a new simpleCon .