This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* | |
| This smartcontract is used to store documents text on the Ethereum blockchain | |
| and to get the document by document's hash (sha256). | |
| */ | |
| contract ProofOfExistence{ | |
| /* ---- Public variables: */ | |
| string public created; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # \pom.xml Postgresql | |
| <dependency> | |
| <groupId>org.postgresql</groupId> | |
| <artifactId>postgresql</artifactId> | |
| <scope>runtime</scope> | |
| </dependency> | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # \src\main\resources\application.properties | |
| ## Database Properties | |
| spring.datasource.driver-class-name=org.postgresql.Driver | |
| spring.datasource.url=jdbc:postgresql://localhost:5432/seu-banco-de-dados | |
| spring.datasource.username=postgres | |
| spring.datasource.password=senha-do-seu-postgres-user | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.residencia18.springbootmanytomany.entity; | |
| import java.util.Set; | |
| import javax.persistence.CascadeType; | |
| import javax.persistence.Column; | |
| import javax.persistence.Entity; | |
| import javax.persistence.FetchType; | |
| import javax.persistence.GeneratedValue; | |
| import javax.persistence.GenerationType; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.residencia18.springbootmanytomany.entity; | |
| import java.util.Set; | |
| import javax.persistence.CascadeType; | |
| import javax.persistence.Column; | |
| import javax.persistence.Entity; | |
| import javax.persistence.FetchType; | |
| import javax.persistence.GeneratedValue; | |
| import javax.persistence.GenerationType; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.residencia18.springbootmanytomany.repository; | |
| import com.residencia18.springbootmanytomany.entity.Employee; | |
| import org.springframework.data.jpa.repository.JpaRepository; | |
| public interface EmployeeRepository extends JpaRepository<Employee, Integer> { | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.residencia18.springbootmanytomany.controller; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import com.residencia18.springbootmanytomany.entity.Employee; | |
| import com.residencia18.springbootmanytomany.entity.Project; | |
| import com.residencia18.springbootmanytomany.repository.EmployeeRepository; | |
| import com.residencia18.springbootmanytomany.repository.ProjectRepository; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.raven.springbootmanytomany.repository; | |
| import com.raven.springbootmanytomany.entity.Project; | |
| import org.springframework.data.jpa.repository.JpaRepository; | |
| public interface ProjectRepository extends JpaRepository<Project, Integer> { | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.residencia18.springbootmanytomany.controller; | |
| import java.util.HashSet; | |
| import java.util.Set; | |
| import com.residencia18.springbootmanytomany.entity.Employee; | |
| import com.residencia18.springbootmanytomany.entity.Project; | |
| import com.residencia18.springbootmanytomany.repository.EmployeeRepository; | |
| import com.residencia18.springbootmanytomany.repository.ProjectRepository; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Teste de APIs REST | |
| Agora colocaremos essas APIs REST nos controladores de funcionários e projetos para teste. | |
| # Criar funcionário | |
| Para criar um novo funcionário, usaremos a seguinte URL no Postman: | |
| http://localhost:8080/api/employee/createEmployee | |
| # Criar projeto | |
| Para criar um novo projeto, chamamos esta URL no Postman: | |
| http://localhost:8080/api/project/createProject | 
OlderNewer