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