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