├── ETAPA-01 ├── AppRH │ └── AppRH │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── AppRH │ │ │ │ └── AppRH │ │ │ │ ├── AppRhApplication.java │ │ │ │ ├── DataConfiguration.java │ │ │ │ ├── controllers │ │ │ │ └── VagaController.java │ │ │ │ ├── models │ │ │ │ ├── Candidato.java │ │ │ │ └── Vaga.java │ │ │ │ └── repository │ │ │ │ ├── CandidatoRepository.java │ │ │ │ └── VagaRepository.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── static │ │ │ └── bootstrap │ │ │ │ └── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── templates │ │ │ ├── index.html │ │ │ ├── mensagemValidacao.html │ │ │ └── vaga │ │ │ ├── bootstrap │ │ │ └── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── detalhesVaga.html │ │ │ ├── formVaga.html │ │ │ ├── listaVaga.html │ │ │ └── update-vaga.html │ │ └── test │ │ └── java │ │ └── com │ │ └── AppRH │ │ └── AppRH │ │ └── AppRhApplicationTests.java └── TemplateCodigosEArquivos-01 │ └── resources │ ├── application.properties │ ├── static │ └── bootstrap │ │ └── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── templates │ ├── index.html │ ├── mensagemValidacao.html │ └── vaga │ ├── bootstrap │ └── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── detalhesVaga.html │ ├── formVaga.html │ ├── listaVaga.html │ └── update-vaga.html ├── ETAPA-02 ├── AppRH │ └── AppRH │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ ├── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── com │ │ │ │ └── AppRH │ │ │ │ └── AppRH │ │ │ │ ├── AppRhApplication.java │ │ │ │ ├── DataConfiguration.java │ │ │ │ ├── controllers │ │ │ │ ├── FuncionarioController.java │ │ │ │ └── VagaController.java │ │ │ │ ├── models │ │ │ │ ├── Candidato.java │ │ │ │ ├── Dependentes.java │ │ │ │ ├── Funcionario.java │ │ │ │ └── Vaga.java │ │ │ │ └── repository │ │ │ │ ├── CandidatoRepository.java │ │ │ │ ├── DependentesRepository.java │ │ │ │ ├── FuncionarioRepository.java │ │ │ │ └── VagaRepository.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── static │ │ │ └── bootstrap │ │ │ │ └── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── templates │ │ │ ├── funcionario │ │ │ ├── dependentes.html │ │ │ ├── formFuncionario.html │ │ │ ├── listaFuncionario.html │ │ │ └── update-funcionario.html │ │ │ ├── index.html │ │ │ ├── mensagemValidacao.html │ │ │ └── vaga │ │ │ ├── detalhesVaga.html │ │ │ ├── formVaga.html │ │ │ ├── listaVaga.html │ │ │ └── update-vaga.html │ │ └── test │ │ └── java │ │ └── com │ │ └── AppRH │ │ └── AppRH │ │ └── AppRhApplicationTests.java └── TemplateCodigosEArquivos-02 │ └── resources │ ├── static │ └── bootstrap │ │ └── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── templates │ ├── funcionario │ ├── dependentes.html │ ├── formFuncionario.html │ ├── listaFuncionario.html │ └── update-funcionario.html │ ├── index.html │ └── vaga │ ├── detalhesVaga.html │ ├── formVaga.html │ ├── listaVaga.html │ └── update-vaga.html ├── ETAPA-03 ├── AppRH │ └── AppRH │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ ├── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── com │ │ │ │ └── AppRH │ │ │ │ └── AppRH │ │ │ │ ├── AppRhApplication.java │ │ │ │ ├── DataConfiguration.java │ │ │ │ ├── controllers │ │ │ │ ├── BuscaController.java │ │ │ │ ├── FuncionarioController.java │ │ │ │ └── VagaController.java │ │ │ │ ├── models │ │ │ │ ├── Candidato.java │ │ │ │ ├── Dependentes.java │ │ │ │ ├── Funcionario.java │ │ │ │ └── Vaga.java │ │ │ │ └── repository │ │ │ │ ├── CandidatoRepository.java │ │ │ │ ├── DependentesRepository.java │ │ │ │ ├── FuncionarioRepository.java │ │ │ │ └── VagaRepository.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── static │ │ │ └── bootstrap │ │ │ │ └── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── templates │ │ │ ├── funcionario │ │ │ ├── dependentes.html │ │ │ ├── formFuncionario.html │ │ │ ├── listaFuncionario.html │ │ │ └── update-funcionario.html │ │ │ ├── index.html │ │ │ ├── mensagemValidacao.html │ │ │ └── vaga │ │ │ ├── detalhesVaga.html │ │ │ ├── formVaga.html │ │ │ ├── listaVaga.html │ │ │ └── update-vaga.html │ │ └── test │ │ └── java │ │ └── com │ │ └── AppRH │ │ └── AppRH │ │ └── AppRhApplicationTests.java └── TemplateCodigosEArquivos-03 │ └── resources │ ├── static │ └── bootstrap │ │ └── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ └── templates │ └── index.html ├── ETAPA-04 ├── AppRH │ └── AppRH │ │ ├── .gitignore │ │ ├── .mvn │ │ └── wrapper │ │ │ ├── MavenWrapperDownloader.java │ │ │ ├── maven-wrapper.jar │ │ │ └── maven-wrapper.properties │ │ ├── mvnw │ │ ├── mvnw.cmd │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ ├── java │ │ │ ├── META-INF │ │ │ │ └── MANIFEST.MF │ │ │ └── com │ │ │ │ └── AppRH │ │ │ │ └── AppRH │ │ │ │ ├── AppRhApplication.java │ │ │ │ ├── DataConfiguration.java │ │ │ │ ├── WebConfig.java │ │ │ │ ├── controllers │ │ │ │ ├── BuscaController.java │ │ │ │ ├── FuncionarioController.java │ │ │ │ └── VagaController.java │ │ │ │ ├── models │ │ │ │ ├── Candidato.java │ │ │ │ ├── Dependente.java │ │ │ │ ├── Funcionario.java │ │ │ │ └── Vaga.java │ │ │ │ └── repository │ │ │ │ ├── CandidatoRepository.java │ │ │ │ ├── DependenteRepository.java │ │ │ │ ├── FuncionarioRepository.java │ │ │ │ └── VagaRepository.java │ │ └── resources │ │ │ ├── application.properties │ │ │ ├── static │ │ │ └── bootstrap │ │ │ │ └── css │ │ │ │ ├── bootstrap-grid.css │ │ │ │ ├── bootstrap-grid.css.map │ │ │ │ ├── bootstrap-grid.min.css │ │ │ │ ├── bootstrap-grid.min.css.map │ │ │ │ ├── bootstrap-reboot.css │ │ │ │ ├── bootstrap-reboot.css.map │ │ │ │ ├── bootstrap-reboot.min.css │ │ │ │ ├── bootstrap-reboot.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ └── templates │ │ │ ├── funcionario │ │ │ ├── detalhes-funcionario.html │ │ │ ├── form-funcionario.html │ │ │ ├── lista-funcionario.html │ │ │ └── update-funcionario.html │ │ │ ├── index.html │ │ │ ├── mensagem-validacao.html │ │ │ └── vaga │ │ │ ├── detalhes-vaga.html │ │ │ ├── form-vaga.html │ │ │ ├── lista-vaga.html │ │ │ └── update-vaga.html │ │ └── test │ │ └── java │ │ └── com │ │ └── AppRH │ │ └── AppRH │ │ └── AppRhApplicationTests.java ├── Tutorial Seguranca de Spring Security.docx └── dados_funcionarios_vagas.sql ├── LICENSE └── README.md /ETAPA-01/AppRH/AppRH/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FilosoDev/Spring-Boot-tutorial-AppRh/43ae5345f910fb96f5dca47e4417056bece0d335/ETAPA-01/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.6.1 10 | 11 | 12 | com.AppRH 13 | AppRH 14 | 0.0.1-SNAPSHOT 15 | AppRH 16 | Projeto AppRH 17 | 18 | 11 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-thymeleaf 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-web 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-devtools 37 | runtime 38 | true 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-starter-test 43 | test 44 | 45 | 46 | 47 | mysql 48 | mysql-connector-java 49 | runtime 50 | 51 | 52 | 53 | org.springframework.boot 54 | spring-boot-starter-validation 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.springframework.boot 64 | spring-boot-maven-plugin 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/java/com/AppRH/AppRH/AppRhApplication.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class AppRhApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(AppRhApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/java/com/AppRH/AppRH/DataConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.jdbc.datasource.DriverManagerDataSource; 8 | import org.springframework.orm.jpa.JpaVendorAdapter; 9 | import org.springframework.orm.jpa.vendor.Database; 10 | import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 11 | 12 | @Configuration 13 | public class DataConfiguration { 14 | 15 | @Bean 16 | public DataSource dataSource() { 17 | DriverManagerDataSource dataSource = new DriverManagerDataSource(); 18 | dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); 19 | dataSource.setUrl("jdbc:mysql://localhost:3306/AppRH?useTimezone=true&serverTimezone=UTC"); 20 | dataSource.setUsername("root"); 21 | dataSource.setPassword("admin"); 22 | return dataSource; 23 | } 24 | 25 | @Bean 26 | public JpaVendorAdapter jpaVendorAdapter() { 27 | HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter(); 28 | adapter.setDatabase(Database.MYSQL); 29 | adapter.setShowSql(true); 30 | adapter.setGenerateDdl(true); 31 | adapter.setDatabasePlatform("org.hibernate.dialect.MariaDBDialect"); 32 | adapter.setPrepareConnection(true); 33 | return adapter; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Candidato.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.Id; 7 | import javax.persistence.ManyToOne; 8 | import javax.validation.constraints.NotEmpty; 9 | 10 | @Entity 11 | public class Candidato { 12 | 13 | @Id 14 | @GeneratedValue 15 | private long id; 16 | 17 | @Column(unique = true) 18 | private String rg; 19 | 20 | @NotEmpty 21 | private String nomeCandidato; 22 | 23 | @NotEmpty 24 | private String email; 25 | 26 | @ManyToOne 27 | private Vaga vaga; 28 | 29 | public String getRg() { 30 | return rg; 31 | } 32 | 33 | public void setRg(String rg) { 34 | this.rg = rg; 35 | } 36 | 37 | public String getNomeCandidato() { 38 | return nomeCandidato; 39 | } 40 | 41 | public void setNomeCandidato(String nomeCandidato) { 42 | this.nomeCandidato = nomeCandidato; 43 | } 44 | 45 | public String getEmail() { 46 | return email; 47 | } 48 | 49 | public void setEmail(String email) { 50 | this.email = email; 51 | } 52 | 53 | public Vaga getVaga() { 54 | return vaga; 55 | } 56 | 57 | public void setVaga(Vaga vaga) { 58 | this.vaga = vaga; 59 | } 60 | 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Vaga.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | 12 | import javax.validation.constraints.NotEmpty; 13 | 14 | @Entity 15 | public class Vaga implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private long codigo; 22 | 23 | @NotEmpty 24 | private String nome; 25 | 26 | @NotEmpty 27 | private String descricao; 28 | 29 | @NotEmpty 30 | private String data; 31 | 32 | @NotEmpty 33 | private String salario; 34 | 35 | @OneToMany(mappedBy = "vaga", cascade = CascadeType.REMOVE) 36 | private List candidatos; 37 | 38 | public long getCodigo() { 39 | return codigo; 40 | } 41 | 42 | public void setCodigo(long codigo) { 43 | this.codigo = codigo; 44 | } 45 | 46 | public String getNome() { 47 | return nome; 48 | } 49 | 50 | public void setNome(String nome) { 51 | this.nome = nome; 52 | } 53 | 54 | public String getDescricao() { 55 | return descricao; 56 | } 57 | 58 | public void setDescricao(String descricao) { 59 | this.descricao = descricao; 60 | } 61 | 62 | public String getData() { 63 | return data; 64 | } 65 | 66 | public void setData(String data) { 67 | this.data = data; 68 | } 69 | 70 | public String getSalario() { 71 | return salario; 72 | } 73 | 74 | public void setSalario(String salario) { 75 | this.salario = salario; 76 | } 77 | 78 | public List getCandidatos() { 79 | return candidatos; 80 | } 81 | 82 | public void setCandidatos(List candidatos) { 83 | this.candidatos = candidatos; 84 | } 85 | 86 | 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/CandidatoRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | import com.AppRH.AppRH.models.Candidato; 8 | import com.AppRH.AppRH.models.Vaga; 9 | 10 | public interface CandidatoRepository extends CrudRepository { 11 | 12 | IterablefindByVaga(Vaga vaga); 13 | 14 | Candidato findByRg(String rg); 15 | 16 | Candidato findById(long id); 17 | 18 | ListfindByNomeCandidato(String nomeCandidato); 19 | } 20 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/VagaRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | import com.AppRH.AppRH.models.Vaga; 8 | 9 | public interface VagaRepository extends CrudRepository { 10 | Vaga findByCodigo(long codigo); 11 | List findByNome(String nome); 12 | } 13 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.datasource.url=jdbc:mysql://localhost:3306/apprh 3 | spring.datasource.username=root 4 | spring.datasource.password=admin 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | spring.jpa.database-platform = org.hibernate.dialect.MariaDBDialect 7 | spring.jpa.generate-ddl=true 8 | spring.jpa.hibernate.ddl-auto = update -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 53 | 54 |
55 | 56 |
57 |

58 | 59 |
60 | 61 |
62 |
63 |
64 |

Vagas

65 |
66 |
67 |

Módulo responsável pelas vagas ofertadas 68 | pela agência de RH.

69 | Listar Vagas Cadastrar Vagas 71 |
72 |
73 |
74 | 75 | 76 |
77 | 78 |
79 | 80 | 81 | 82 | 86 | 87 | 88 | 89 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/templates/mensagemValidacao.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | | App RH - UC 12 | 7 | 8 | 9 | 10 | 15 | 16 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/templates/vaga/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/templates/vaga/formVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 45 | 46 |
47 | 48 | 49 | 50 |
51 | 52 |

Cadastrar vaga

53 | 54 |
55 | 56 | 57 | 58 | 59 |
60 | 61 | 62 |
63 | * 66 | Utilize nomes e termos mais utilizados no mercado. 67 |
68 | 69 |
70 |
71 | 72 |
73 | * Data em que a vaga 76 | expira. 77 |
78 |
79 |
80 |
81 | R$ * Utilize valores 85 | considerando vírgula e ponto. 86 |
87 | 88 |
89 |
90 | 91 | 92 |
93 | 94 | 95 | 97 | * Breve resumo da 98 | vaga oferecida.. 99 | 100 |
101 | 102 | 103 | 104 | 105 |
106 | 107 |
108 | 109 | 110 |
111 | 112 | 116 | 117 | 118 | 119 | 120 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/templates/vaga/listaVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | VagasApp 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 53 | 54 |
55 | 56 | 57 |
58 | 59 |

Lista de vagas cadastradas

60 | 61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
Nome da vaga:Descrição:Salário:Expira:Ações:
78 | R$
88 | 89 | 90 |
91 | 92 | 96 | 97 | 98 | 99 | 100 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/main/resources/templates/vaga/update-vaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | | App RH - UC 12 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 53 | 54 |
55 | 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 |

Atualizar vaga

66 | 67 |
68 | 69 |
70 | * Utilize nomes e 72 | termos mais utilizados no mercado. 73 |
74 | 75 | 76 |
77 | 78 |
79 |
80 | * Data em que a vaga 82 | expira. 83 |
84 |
85 |
86 | 87 |
88 | R$ * Utilize valores 91 | considerando vírgula e ponto. 92 |
93 |
94 |
95 | 96 |
97 | 98 | 99 | * Breve resumo da 100 | vaga oferecida.. 101 |
102 | 103 | 104 | 105 | 106 |
107 |
108 | 109 | 110 |
111 | 112 | 116 | 117 | 118 | 119 | 120 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /ETAPA-01/AppRH/AppRH/src/test/java/com/AppRH/AppRH/AppRhApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class AppRhApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.datasource.url=jdbc:mysql://localhost:3306/apprh 2 | spring.datasource.username=root 3 | spring.datasource.password=admin 4 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 5 | spring.jpa.database-platform = org.hibernate.dialect.MariaDBDialect 6 | spring.jpa.generate-ddl=true 7 | spring.jpa.hibernate.ddl-auto = update 8 | -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 53 | 54 |
55 | 56 |
57 |

58 | 59 |
60 | 61 |
62 |
63 |
64 |

Vagas

65 |
66 |
67 |

Módulo responsável pelas vagas ofertadas 68 | pela agência de RH.

69 | Listar Vagas Cadastrar Vagas 71 |
72 |
73 |
74 | 75 | 76 |
77 | 78 |
79 | 80 | 81 | 82 | 86 | 87 | 88 | 89 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/templates/mensagemValidacao.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | | App RH - UC 12 | 7 | 8 | 9 | 10 | 15 | 16 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/templates/vaga/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/templates/vaga/formVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | App RH - UC 12 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 44 | 45 |
46 | 47 | 48 | 49 |
50 | 51 |

Cadastrar vaga

52 | 53 |
54 | 55 | 56 | 57 |
58 | 59 | 60 |
61 | * 63 | Utilize nomes e termos mais utilizados no mercado. 64 |
65 | 66 |
67 |
68 | 69 |
70 | * Data em que a vaga 72 | expira. 73 |
74 |
75 |
76 |
77 | R$ * Utilize valores 80 | considerando vírgula e ponto. 81 |
82 | 83 |
84 |
85 | 86 | 87 |
88 | 89 | 90 | 91 | * Breve resumo da 92 | vaga oferecida.. 93 | 94 |
95 | 96 | 97 | 98 | 99 |
100 | 101 |
102 | 103 | 104 |
105 | 106 | 110 | 111 | 112 | 113 | 114 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/templates/vaga/listaVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | VagasApp 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 53 | 54 |
55 | 56 | 57 |
58 | 59 |

Lista de vagas cadastradas

60 | 61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 |
Nome da vaga:Descrição:Salário:Expira:Ações:
R$
87 | 88 | 89 |
90 | 91 | 95 | 96 | 97 | 98 | 99 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /ETAPA-01/TemplateCodigosEArquivos-01/resources/templates/vaga/update-vaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | | App RH - UC 12 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 53 | 54 |
55 | 56 | 57 |
58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 |

Atualizar vaga

66 | 67 |
68 | 69 |
70 | * Utilize nomes e 72 | termos mais utilizados no mercado. 73 |
74 | 75 | 76 |
77 | 78 |
79 |
80 | * Data em que a vaga 82 | expira. 83 |
84 |
85 |
86 | 87 |
88 | R$ * Utilize valores 91 | considerando vírgula e ponto. 92 |
93 |
94 |
95 | 96 |
97 | 98 | 99 | * Breve resumo da 100 | vaga oferecida.. 101 |
102 | 103 | 104 | 105 | 106 |
107 |
108 | 109 | 110 |
111 | 112 | 116 | 117 | 118 | 119 | 120 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FilosoDev/Spring-Boot-tutorial-AppRh/43ae5345f910fb96f5dca47e4417056bece0d335/ETAPA-02/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.6.1 10 | 11 | 12 | com.AppRH 13 | AppRH 14 | 0.0.1-SNAPSHOT 15 | AppRH 16 | Projeto AppRH 17 | 18 | 11 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-thymeleaf 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-web 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-devtools 37 | runtime 38 | true 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-starter-test 43 | test 44 | 45 | 46 | 47 | mysql 48 | mysql-connector-java 49 | runtime 50 | 51 | 52 | 53 | org.springframework.boot 54 | spring-boot-starter-validation 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.springframework.boot 64 | spring-boot-maven-plugin 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/AppRhApplication.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class AppRhApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(AppRhApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/DataConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.jdbc.datasource.DriverManagerDataSource; 8 | import org.springframework.orm.jpa.JpaVendorAdapter; 9 | import org.springframework.orm.jpa.vendor.Database; 10 | import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 11 | 12 | @Configuration 13 | public class DataConfiguration { 14 | 15 | @Bean 16 | public DataSource dataSource() { 17 | DriverManagerDataSource dataSource = new DriverManagerDataSource(); 18 | dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); 19 | dataSource.setUrl("jdbc:mysql://localhost:3306/AppRH?useTimezone=true&serverTimezone=UTC"); 20 | dataSource.setUsername("root"); 21 | dataSource.setPassword("admin"); 22 | return dataSource; 23 | } 24 | 25 | @Bean 26 | public JpaVendorAdapter jpaVendorAdapter() { 27 | HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter(); 28 | adapter.setDatabase(Database.MYSQL); 29 | adapter.setShowSql(true); 30 | adapter.setGenerateDdl(true); 31 | adapter.setDatabasePlatform("org.hibernate.dialect.MariaDBDialect"); 32 | adapter.setPrepareConnection(true); 33 | return adapter; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Candidato.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.Id; 7 | import javax.persistence.ManyToOne; 8 | import javax.validation.constraints.NotEmpty; 9 | 10 | @Entity 11 | public class Candidato { 12 | 13 | @Id 14 | @GeneratedValue 15 | private long id; 16 | 17 | @Column(unique = true) 18 | private String rg; 19 | 20 | @NotEmpty 21 | private String nomeCandidato; 22 | 23 | @NotEmpty 24 | private String email; 25 | 26 | @ManyToOne 27 | private Vaga vaga; 28 | 29 | public String getRg() { 30 | return rg; 31 | } 32 | 33 | public void setRg(String rg) { 34 | this.rg = rg; 35 | } 36 | 37 | public String getNomeCandidato() { 38 | return nomeCandidato; 39 | } 40 | 41 | public void setNomeCandidato(String nomeCandidato) { 42 | this.nomeCandidato = nomeCandidato; 43 | } 44 | 45 | public String getEmail() { 46 | return email; 47 | } 48 | 49 | public void setEmail(String email) { 50 | this.email = email; 51 | } 52 | 53 | public Vaga getVaga() { 54 | return vaga; 55 | } 56 | 57 | public void setVaga(Vaga vaga) { 58 | this.vaga = vaga; 59 | } 60 | 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Dependentes.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Entity; 6 | import javax.persistence.Column; 7 | import javax.persistence.ManyToOne; 8 | 9 | 10 | @Entity 11 | public class Dependentes { 12 | 13 | @Id 14 | @GeneratedValue 15 | private long id; 16 | 17 | @Column(unique = true) 18 | private String cpf; 19 | 20 | private String nome; 21 | private String datanascimento; 22 | 23 | @ManyToOne 24 | private Funcionario funcionario; 25 | 26 | public String getCpf() { 27 | return cpf; 28 | } 29 | 30 | public void setCpf(String cpf) { 31 | this.cpf = cpf; 32 | } 33 | 34 | public String getNome() { 35 | return nome; 36 | } 37 | 38 | public void setNome(String nome) { 39 | this.nome = nome; 40 | } 41 | 42 | public String getDatanascimento() { 43 | return datanascimento; 44 | } 45 | 46 | public void setDatanascimento(String datanascimento) { 47 | this.datanascimento = datanascimento; 48 | } 49 | 50 | public Funcionario getFuncionario() { 51 | return funcionario; 52 | } 53 | 54 | public void setFuncionario(Funcionario funcionario) { 55 | this.funcionario = funcionario; 56 | } 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Funcionario.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | import javax.persistence.CascadeType; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.OneToMany; 12 | 13 | 14 | @Entity 15 | public class Funcionario implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private long id; 22 | 23 | private String nome; 24 | private String data; 25 | private String email; 26 | 27 | @OneToMany(mappedBy = "funcionario", cascade = CascadeType.REMOVE) 28 | private Listdependentes; 29 | 30 | public long getId() { 31 | return id; 32 | } 33 | 34 | public void setId(long id) { 35 | this.id = id; 36 | } 37 | 38 | public String getNome() { 39 | return nome; 40 | } 41 | 42 | public void setNome(String nome) { 43 | this.nome = nome; 44 | } 45 | 46 | public String getData() { 47 | return data; 48 | } 49 | 50 | public void setData(String data) { 51 | this.data = data; 52 | } 53 | 54 | public String getEmail() { 55 | return email; 56 | } 57 | 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | 62 | public List getDependentes() { 63 | return dependentes; 64 | } 65 | 66 | public void setDependentes(List dependentes) { 67 | this.dependentes = dependentes; 68 | } 69 | 70 | 71 | 72 | 73 | } 74 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Vaga.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | 12 | import javax.validation.constraints.NotEmpty; 13 | 14 | @Entity 15 | public class Vaga implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private long codigo; 22 | 23 | @NotEmpty 24 | private String nome; 25 | 26 | @NotEmpty 27 | private String descricao; 28 | 29 | @NotEmpty 30 | private String data; 31 | 32 | @NotEmpty 33 | private String salario; 34 | 35 | @OneToMany(mappedBy = "vaga", cascade = CascadeType.REMOVE) 36 | private List candidatos; 37 | 38 | public long getCodigo() { 39 | return codigo; 40 | } 41 | 42 | public void setCodigo(long codigo) { 43 | this.codigo = codigo; 44 | } 45 | 46 | public String getNome() { 47 | return nome; 48 | } 49 | 50 | public void setNome(String nome) { 51 | this.nome = nome; 52 | } 53 | 54 | public String getDescricao() { 55 | return descricao; 56 | } 57 | 58 | public void setDescricao(String descricao) { 59 | this.descricao = descricao; 60 | } 61 | 62 | public String getData() { 63 | return data; 64 | } 65 | 66 | public void setData(String data) { 67 | this.data = data; 68 | } 69 | 70 | public String getSalario() { 71 | return salario; 72 | } 73 | 74 | public void setSalario(String salario) { 75 | this.salario = salario; 76 | } 77 | 78 | public List getCandidatos() { 79 | return candidatos; 80 | } 81 | 82 | public void setCandidatos(List candidatos) { 83 | this.candidatos = candidatos; 84 | } 85 | 86 | 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/CandidatoRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | import com.AppRH.AppRH.models.Candidato; 8 | import com.AppRH.AppRH.models.Vaga; 9 | 10 | public interface CandidatoRepository extends CrudRepository { 11 | 12 | IterablefindByVaga(Vaga vaga); 13 | 14 | Candidato findByRg(String rg); 15 | 16 | Candidato findById(long id); 17 | 18 | ListfindByNomeCandidato(String nomeCandidato); 19 | } 20 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/DependentesRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Dependentes; 9 | import com.AppRH.AppRH.models.Funcionario; 10 | 11 | public interface DependentesRepository extends CrudRepository { 12 | 13 | Iterable findByFuncionario(Funcionario funcionario); 14 | 15 | // pensando no método delete 16 | Dependentes findByCpf(String cpf); 17 | Dependentes findById(long id); 18 | 19 | // criado para implementar 20 | List findByNome(String nome); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/FuncionarioRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Funcionario; 9 | 10 | public interface FuncionarioRepository extends CrudRepository{ 11 | 12 | Funcionario findById(long id); 13 | 14 | // busca 15 | Funcionario findByNome(String nome); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/VagaRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | import com.AppRH.AppRH.models.Vaga; 8 | 9 | public interface VagaRepository extends CrudRepository { 10 | Vaga findByCodigo(long codigo); 11 | List findByNome(String nome); 12 | } 13 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.datasource.url=jdbc:mysql://localhost:3306/apprh 3 | spring.datasource.username=root 4 | spring.datasource.password=admin 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | spring.jpa.database-platform = org.hibernate.dialect.MariaDBDialect 7 | spring.jpa.generate-ddl=true 8 | spring.jpa.hibernate.ddl-auto = update -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/funcionario/formFuncionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 52 | 53 |
54 | 55 | 56 | 57 |
58 | 59 |

Cadastro de Funcionário

60 | 61 |
62 | 63 | 64 | 65 |
66 | 67 |
68 | 70 | * Nome completo. 71 |
72 | 73 |
74 |
75 | 76 |
77 | 79 | * Dia/Mês/Ano. 80 |
81 |
82 |
83 | 85 |
86 | 87 |
88 | 90 |
91 | 92 |
93 |
94 | 95 | 96 | 97 | 98 |
99 | 100 | 101 | 102 |
103 | 104 | 108 | 109 | 110 | 111 | 112 | 113 | 117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/funcionario/listaFuncionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | | App RH - UC 12 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 55 | 56 |
57 | 58 | 59 |
60 | 61 |

Lista interna de funcionários

62 | 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 84 | 85 | 86 | 88 | 89 | 90 | 91 |
Nome:Data de nascimento:E-mail:Ação
92 | 93 | 94 |
95 | 96 | 100 | 101 | 102 | 103 | 104 | 105 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/funcionario/update-funcionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | | App RH - UC 12 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 54 | 55 |
56 | 57 | 58 |
59 | 60 | 61 | 62 |
63 | 64 |

Atualizar Funcionário

65 | 66 |
67 | 68 |
69 | * Utilize nomes e 71 | termos mais utilizados no mercado. 72 |
73 | 74 | 75 |
76 | 77 |
78 |
79 | * Data de 81 | nascimento. 82 |
83 |
84 |
85 | 86 |
87 | * email@email.com 89 |
90 | 91 |
92 |
93 | 94 | 95 | 96 | 97 | 99 |
100 |
101 | 102 | 103 | 104 |
105 | 106 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 54 | 55 |
56 | 57 |
58 |

59 | 60 |
61 |
62 |
63 |
64 |

Funcionários

65 |
66 |
67 | 68 |

Módulo responsável pelos funcionários da 69 | agência de RH.

70 | Listar 71 | Funcionários Cadastrar 72 | Funcionário 73 |
74 |
75 |
76 |
77 |
78 |
79 |

Vagas

80 |
81 |
82 |

Módulo responsável pelas vagas ofertadas 83 | pela agência de RH.

84 | Listar Vagas Cadastrar Vagas 86 |
87 |
88 |
89 | 90 | 91 |
92 | 93 |
94 | 95 | 96 | 100 | 101 | 102 | 103 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/mensagemValidacao.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | | App RH - UC 12 | 7 | 8 | 9 | 10 | 15 | 16 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/vaga/formVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | App RH - UC 12 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 46 | 47 |
48 | 49 | 50 | 51 |
52 | 53 |

Cadastrar vaga

54 | 55 |
56 | 57 | 58 | 59 | 60 |
61 | 62 | 63 |
64 | * 66 | Utilize nomes e termos mais utilizados no mercado. 67 |
68 | 69 |
70 |
71 | 72 |
73 | * Data em que a vaga 75 | expira. 76 |
77 |
78 |
79 |
80 | R$ * Utilize valores 83 | considerando vírgula e ponto. 84 |
85 | 86 |
87 |
88 | 89 | 90 |
91 | 92 | 93 | 94 | * Breve resumo da 95 | vaga oferecida.. 96 | 97 |
98 | 99 | 100 | 101 | 102 |
103 | 104 |
105 | 106 | 107 |
108 | 109 | 113 | 114 | 115 | 116 | 117 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/main/resources/templates/vaga/listaVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | VagasApp 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 56 | 57 |
58 | 59 | 60 |
61 | 62 |

Lista de vagas cadastradas

63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 87 | 89 | 91 | 92 | 93 |
Nome da vaga:Descrição:Salário:Expira:Ações:
81 | R$
94 | 95 | 96 |
97 | 98 | 102 | 103 | 104 | 105 | 106 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /ETAPA-02/AppRH/AppRH/src/test/java/com/AppRH/AppRH/AppRhApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class AppRhApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/templates/funcionario/formFuncionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 52 | 53 |
54 | 55 | 56 | 57 |
58 | 59 |

Cadastro de Funcionário

60 | 61 |
62 | 63 | 64 | 65 |
66 | 67 |
68 | 70 | * Nome completo. 71 |
72 | 73 |
74 |
75 | 76 |
77 | 79 | * Dia/Mês/Ano. 80 |
81 |
82 |
83 | 85 |
86 | 87 |
88 | 90 |
91 | 92 |
93 |
94 | 95 | 96 | 97 | 98 |
99 | 100 | 101 | 102 |
103 | 104 | 108 | 109 | 110 | 111 | 112 | 113 | 117 | 118 | 119 | 120 | 121 | -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/templates/funcionario/listaFuncionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | | App RH - UC 12 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 55 | 56 |
57 | 58 | 59 |
60 | 61 |

Lista interna de funcionários

62 | 63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 84 | 85 | 86 | 88 | 89 | 90 | 91 |
Nome:Data de nascimento:E-mail:Ação
92 | 93 | 94 |
95 | 96 | 100 | 101 | 102 | 103 | 104 | 105 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/templates/funcionario/update-funcionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | | App RH - UC 12 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 54 | 55 |
56 | 57 | 58 |
59 | 60 | 61 | 62 |
63 | 64 |

Atualizar Funcionário

65 | 66 |
67 | 68 |
69 | * Utilize nomes e 71 | termos mais utilizados no mercado. 72 |
73 | 74 | 75 |
76 | 77 |
78 |
79 | * Data de 81 | nascimento. 82 |
83 |
84 |
85 | 86 |
87 | * email@email.com 89 |
90 | 91 |
92 |
93 | 94 | 95 | 96 | 97 | 99 |
100 |
101 | 102 | 103 | 104 |
105 | 106 | 110 | 111 | 112 | 113 | 114 | 115 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 54 | 55 |
56 | 57 |
58 |

59 | 60 |
61 |
62 |
63 |
64 |

Funcionários

65 |
66 |
67 | 68 |

Módulo responsável pelos funcionários da 69 | agência de RH.

70 | Listar 71 | Funcionários Cadastrar 72 | Funcionário 73 |
74 |
75 |
76 |
77 |
78 |
79 |

Vagas

80 |
81 |
82 |

Módulo responsável pelas vagas ofertadas 83 | pela agência de RH.

84 | Listar Vagas Cadastrar Vagas 86 |
87 |
88 |
89 | 90 | 91 |
92 | 93 |
94 | 95 | 96 | 100 | 101 | 102 | 103 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/templates/vaga/formVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | App RH - UC 12 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 46 | 47 |
48 | 49 | 50 | 51 |
52 | 53 |

Cadastrar vaga

54 | 55 |
56 | 57 | 58 | 59 | 60 |
61 | 62 | 63 |
64 | * 66 | Utilize nomes e termos mais utilizados no mercado. 67 |
68 | 69 |
70 |
71 | 72 |
73 | * Data em que a vaga 75 | expira. 76 |
77 |
78 |
79 |
80 | R$ * Utilize valores 83 | considerando vírgula e ponto. 84 |
85 | 86 |
87 |
88 | 89 | 90 |
91 | 92 | 93 | 94 | * Breve resumo da 95 | vaga oferecida.. 96 | 97 |
98 | 99 | 100 | 101 | 102 |
103 | 104 |
105 | 106 | 107 |
108 | 109 | 113 | 114 | 115 | 116 | 117 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /ETAPA-02/TemplateCodigosEArquivos-02/resources/templates/vaga/listaVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 22 | VagasApp 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 56 | 57 |
58 | 59 | 60 |
61 | 62 |

Lista de vagas cadastradas

63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 87 | 89 | 91 | 92 | 93 |
Nome da vaga:Descrição:Salário:Expira:Ações:
81 | R$
94 | 95 | 96 |
97 | 98 | 102 | 103 | 104 | 105 | 106 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FilosoDev/Spring-Boot-tutorial-AppRh/43ae5345f910fb96f5dca47e4417056bece0d335/ETAPA-03/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.6.1 10 | 11 | 12 | com.AppRH 13 | AppRH 14 | 0.0.1-SNAPSHOT 15 | AppRH 16 | Projeto AppRH 17 | 18 | 11 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-data-jpa 24 | 25 | 26 | org.springframework.boot 27 | spring-boot-starter-thymeleaf 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-web 32 | 33 | 34 | 35 | org.springframework.boot 36 | spring-boot-devtools 37 | runtime 38 | true 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-starter-test 43 | test 44 | 45 | 46 | 47 | mysql 48 | mysql-connector-java 49 | runtime 50 | 51 | 52 | 53 | org.springframework.boot 54 | spring-boot-starter-validation 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.springframework.boot 64 | spring-boot-maven-plugin 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/AppRhApplication.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class AppRhApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(AppRhApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/DataConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.jdbc.datasource.DriverManagerDataSource; 8 | import org.springframework.orm.jpa.JpaVendorAdapter; 9 | import org.springframework.orm.jpa.vendor.Database; 10 | import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 11 | 12 | @Configuration 13 | public class DataConfiguration { 14 | 15 | @Bean 16 | public DataSource dataSource() { 17 | DriverManagerDataSource dataSource = new DriverManagerDataSource(); 18 | dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); 19 | dataSource.setUrl("jdbc:mysql://localhost:3306/AppRH?useTimezone=true&serverTimezone=UTC"); 20 | dataSource.setUsername("root"); 21 | dataSource.setPassword("admin"); 22 | return dataSource; 23 | } 24 | 25 | @Bean 26 | public JpaVendorAdapter jpaVendorAdapter() { 27 | HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter(); 28 | adapter.setDatabase(Database.MYSQL); 29 | adapter.setShowSql(true); 30 | adapter.setGenerateDdl(true); 31 | adapter.setDatabasePlatform("org.hibernate.dialect.MariaDBDialect"); 32 | adapter.setPrepareConnection(true); 33 | return adapter; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/controllers/BuscaController.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestAttribute; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.servlet.ModelAndView; 10 | 11 | import com.AppRH.AppRH.models.Candidato; 12 | import com.AppRH.AppRH.models.Dependentes; 13 | import com.AppRH.AppRH.models.Funcionario; 14 | import com.AppRH.AppRH.models.Vaga; 15 | 16 | import com.AppRH.AppRH.repository.FuncionarioRepository; 17 | import com.AppRH.AppRH.repository.VagaRepository; 18 | import com.AppRH.AppRH.repository.DependentesRepository; 19 | import com.AppRH.AppRH.repository.CandidatoRepository; 20 | 21 | @Controller 22 | public class BuscaController { 23 | 24 | @Autowired 25 | private FuncionarioRepository fr; 26 | 27 | @Autowired 28 | private VagaRepository vr; 29 | 30 | @Autowired 31 | private DependentesRepository dr; 32 | 33 | @Autowired 34 | private CandidatoRepository cr; 35 | 36 | //GET 37 | @RequestMapping(value = "/", method = RequestMethod.GET) 38 | public ModelAndView abrirIndex() { 39 | ModelAndView mv = new ModelAndView("index"); 40 | return mv; 41 | } 42 | 43 | //POST 44 | @RequestMapping(value = "/", method = RequestMethod.POST) 45 | public ModelAndView buscarIndex(@RequestParam("buscar") String buscar, @RequestParam("nome") String nome) { 46 | 47 | ModelAndView mv = new ModelAndView("index"); 48 | String mensagem = "Resultados da busca por " + buscar; 49 | 50 | if(nome.equals("nomefuncionario")) { 51 | mv.addObject("funcionarios", fr.findByNomes(buscar)); 52 | 53 | }else if(nome.equals("nomedependente")) { 54 | mv.addObject("dependentes", dr.findByNomesDependentes(buscar)); 55 | 56 | }else if(nome.equals("nomecandidato")) { 57 | mv.addObject("candidatos", cr.findByNomesCandidatos(buscar)); 58 | 59 | }else if(nome.equals("titulovaga")) { 60 | mv.addObject("vagas", vr.findByNomesVaga(buscar)); 61 | 62 | }else { 63 | mv.addObject("funcionarios", fr.findByNomes(buscar)); 64 | mv.addObject("dependentes", dr.findByNomesDependentes(buscar)); 65 | mv.addObject("candidatos", cr.findByNomesCandidatos(buscar)); 66 | mv.addObject("vagas", vr.findByNomesVaga(buscar)); 67 | } 68 | 69 | mv.addObject("mensagem", mensagem); 70 | 71 | return mv; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Candidato.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.Id; 7 | import javax.persistence.ManyToOne; 8 | import javax.validation.constraints.NotEmpty; 9 | 10 | @Entity 11 | public class Candidato { 12 | 13 | @Id 14 | @GeneratedValue 15 | private long id; 16 | 17 | @Column(unique = true) 18 | private String rg; 19 | 20 | @NotEmpty 21 | private String nomeCandidato; 22 | 23 | @NotEmpty 24 | private String email; 25 | 26 | @ManyToOne 27 | private Vaga vaga; 28 | 29 | public String getRg() { 30 | return rg; 31 | } 32 | 33 | public void setRg(String rg) { 34 | this.rg = rg; 35 | } 36 | 37 | public String getNomeCandidato() { 38 | return nomeCandidato; 39 | } 40 | 41 | public void setNomeCandidato(String nomeCandidato) { 42 | this.nomeCandidato = nomeCandidato; 43 | } 44 | 45 | public String getEmail() { 46 | return email; 47 | } 48 | 49 | public void setEmail(String email) { 50 | this.email = email; 51 | } 52 | 53 | public Vaga getVaga() { 54 | return vaga; 55 | } 56 | 57 | public void setVaga(Vaga vaga) { 58 | this.vaga = vaga; 59 | } 60 | 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Dependentes.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.Entity; 6 | import javax.persistence.Column; 7 | import javax.persistence.ManyToOne; 8 | 9 | 10 | @Entity 11 | public class Dependentes { 12 | 13 | @Id 14 | @GeneratedValue 15 | private long id; 16 | 17 | @Column(unique = true) 18 | private String cpf; 19 | 20 | private String nome; 21 | private String datanascimento; 22 | 23 | @ManyToOne 24 | private Funcionario funcionario; 25 | 26 | public String getCpf() { 27 | return cpf; 28 | } 29 | 30 | public void setCpf(String cpf) { 31 | this.cpf = cpf; 32 | } 33 | 34 | public String getNome() { 35 | return nome; 36 | } 37 | 38 | public void setNome(String nome) { 39 | this.nome = nome; 40 | } 41 | 42 | public String getDatanascimento() { 43 | return datanascimento; 44 | } 45 | 46 | public void setDatanascimento(String datanascimento) { 47 | this.datanascimento = datanascimento; 48 | } 49 | 50 | public Funcionario getFuncionario() { 51 | return funcionario; 52 | } 53 | 54 | public void setFuncionario(Funcionario funcionario) { 55 | this.funcionario = funcionario; 56 | } 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | } 67 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Funcionario.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | import javax.persistence.CascadeType; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.OneToMany; 12 | 13 | 14 | @Entity 15 | public class Funcionario implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private long id; 22 | 23 | private String nome; 24 | private String data; 25 | private String email; 26 | 27 | @OneToMany(mappedBy = "funcionario", cascade = CascadeType.REMOVE) 28 | private Listdependentes; 29 | 30 | public long getId() { 31 | return id; 32 | } 33 | 34 | public void setId(long id) { 35 | this.id = id; 36 | } 37 | 38 | public String getNome() { 39 | return nome; 40 | } 41 | 42 | public void setNome(String nome) { 43 | this.nome = nome; 44 | } 45 | 46 | public String getData() { 47 | return data; 48 | } 49 | 50 | public void setData(String data) { 51 | this.data = data; 52 | } 53 | 54 | public String getEmail() { 55 | return email; 56 | } 57 | 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | 62 | public List getDependentes() { 63 | return dependentes; 64 | } 65 | 66 | public void setDependentes(List dependentes) { 67 | this.dependentes = dependentes; 68 | } 69 | 70 | 71 | 72 | 73 | } 74 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Vaga.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | 12 | import javax.validation.constraints.NotEmpty; 13 | 14 | @Entity 15 | public class Vaga implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.AUTO) 21 | private long codigo; 22 | 23 | @NotEmpty 24 | private String nome; 25 | 26 | @NotEmpty 27 | private String descricao; 28 | 29 | @NotEmpty 30 | private String data; 31 | 32 | @NotEmpty 33 | private String salario; 34 | 35 | @OneToMany(mappedBy = "vaga", cascade = CascadeType.REMOVE) 36 | private List candidatos; 37 | 38 | public long getCodigo() { 39 | return codigo; 40 | } 41 | 42 | public void setCodigo(long codigo) { 43 | this.codigo = codigo; 44 | } 45 | 46 | public String getNome() { 47 | return nome; 48 | } 49 | 50 | public void setNome(String nome) { 51 | this.nome = nome; 52 | } 53 | 54 | public String getDescricao() { 55 | return descricao; 56 | } 57 | 58 | public void setDescricao(String descricao) { 59 | this.descricao = descricao; 60 | } 61 | 62 | public String getData() { 63 | return data; 64 | } 65 | 66 | public void setData(String data) { 67 | this.data = data; 68 | } 69 | 70 | public String getSalario() { 71 | return salario; 72 | } 73 | 74 | public void setSalario(String salario) { 75 | this.salario = salario; 76 | } 77 | 78 | public List getCandidatos() { 79 | return candidatos; 80 | } 81 | 82 | public void setCandidatos(List candidatos) { 83 | this.candidatos = candidatos; 84 | } 85 | 86 | 87 | 88 | 89 | } 90 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/CandidatoRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | import com.AppRH.AppRH.models.Candidato; 8 | import com.AppRH.AppRH.models.Vaga; 9 | 10 | public interface CandidatoRepository extends CrudRepository { 11 | 12 | Iterable findByVaga(Vaga vaga); 13 | 14 | Candidato findByRg(String rg); 15 | 16 | Candidato findById(long id); 17 | 18 | // ListfindByNomeCandidato(String nomeCandidato); 19 | 20 | // para a busca 21 | @Query(value = "select u from Candidato u where u.nomeCandidato like %?1%") 22 | List findByNomesCandidatos(String nomeCandidato); 23 | } 24 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/DependentesRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Dependentes; 9 | import com.AppRH.AppRH.models.Funcionario; 10 | import com.AppRH.AppRH.models.Vaga; 11 | 12 | public interface DependentesRepository extends CrudRepository { 13 | 14 | Iterable findByFuncionario(Funcionario funcionario); 15 | 16 | // pensando no método delete 17 | Dependentes findByCpf(String cpf); 18 | 19 | Dependentes findById(long id); 20 | 21 | // criado para implementar 22 | List findByNome(String nome); 23 | 24 | // para a busca 25 | @Query(value = "select u from Dependentes u where u.nome like %?1%") 26 | List findByNomesDependentes(String nome); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/FuncionarioRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Funcionario; 9 | 10 | public interface FuncionarioRepository extends CrudRepository{ 11 | 12 | Funcionario findById(long id); 13 | 14 | // busca 15 | Funcionario findByNome(String nome); 16 | 17 | // para a busca 18 | @Query(value = "select u from Funcionario u where u.nome like %?1%") 19 | ListfindByNomes(String nome); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/VagaRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Funcionario; 9 | import com.AppRH.AppRH.models.Vaga; 10 | 11 | public interface VagaRepository extends CrudRepository { 12 | Vaga findByCodigo(long codigo); 13 | 14 | List findByNome(String nome); 15 | 16 | // para a busca 17 | @Query(value = "select u from Vaga u where u.nome like %?1%") 18 | List findByNomesVaga(String nome); 19 | } 20 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.datasource.url=jdbc:mysql://localhost:3306/apprh 3 | spring.datasource.username=root 4 | spring.datasource.password=admin 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | spring.jpa.database-platform = org.hibernate.dialect.MariaDBDialect 7 | spring.jpa.generate-ddl=true 8 | spring.jpa.hibernate.ddl-auto = update -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/templates/funcionario/formFuncionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 | 56 | 57 |
58 | 59 | 60 | 61 |
62 | 63 |

Cadastro de Funcionário

64 | 65 |
66 | 67 | 68 | 69 |
70 | 71 |
72 | 74 | * Nome completo. 75 |
76 | 77 |
78 |
79 | 80 |
81 | 83 | * Dia/Mês/Ano. 84 |
85 |
86 |
87 | 89 |
90 | 91 |
92 | 94 |
95 | 96 |
97 |
98 | 99 | 100 | 101 | 102 |
103 | 104 | 105 | 106 |
107 | 108 | 112 | 113 | 114 | 115 | 116 | 117 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/templates/funcionario/listaFuncionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 25 | 26 | | App RH - UC 12 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |
34 | 35 | 59 | 60 |
61 | 62 | 63 |
64 | 65 |

Lista interna de funcionários

66 | 67 |
68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 88 | 89 | 90 | 92 | 93 | 94 | 95 |
Nome:Data de nascimento:E-mail:Ação
96 | 97 | 98 |
99 | 100 | 104 | 105 | 106 | 107 | 108 | 109 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/templates/funcionario/update-funcionario.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | App RH 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 25 | 26 | | App RH - UC 12 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 58 | 59 |
60 | 61 | 62 |
63 | 64 | 65 | 66 |
67 | 68 |

Atualizar Funcionário

69 | 70 |
71 | 72 |
73 | * Utilize nomes e 75 | termos mais utilizados no mercado. 76 |
77 | 78 | 79 |
80 | 81 |
82 |
83 | * Data de 85 | nascimento. 86 |
87 |
88 |
89 | 90 |
91 | * email@email.com 93 |
94 | 95 |
96 |
97 | 98 | 99 | 100 | 101 | 103 |
104 |
105 | 106 | 107 | 108 |
109 | 110 | 114 | 115 | 116 | 117 | 118 | 119 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/templates/mensagemValidacao.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | | App RH - UC 12 | 7 | 8 | 9 | 10 | 15 | 16 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/templates/vaga/formVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | App RH - UC 12 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 50 | 51 |
52 | 53 | 54 | 55 |
56 | 57 |

Cadastrar vaga

58 | 59 |
60 | 61 | 62 | 63 | 64 |
65 | 66 | 67 |
68 | * 70 | Utilize nomes e termos mais utilizados no mercado. 71 |
72 | 73 |
74 |
75 | 76 |
77 | * Data em que a vaga 79 | expira. 80 |
81 |
82 |
83 |
84 | R$ * Utilize valores 87 | considerando vírgula e ponto. 88 |
89 | 90 |
91 |
92 | 93 | 94 |
95 | 96 | 97 | 98 | * Breve resumo da 99 | vaga oferecida.. 100 | 101 |
102 | 103 | 104 | 105 | 106 |
107 | 108 |
109 | 110 | 111 |
112 | 113 | 117 | 118 | 119 | 120 | 121 | 125 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/main/resources/templates/vaga/listaVaga.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | | App RH - UC 12 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 25 | 26 | VagasApp 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
35 | 36 | 60 | 61 |
62 | 63 | 64 |
65 | 66 |

Lista de vagas cadastradas

67 | 68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 86 | 87 | 88 | 89 | 91 | 93 | 95 | 96 | 97 |
Nome da vaga:Descrição:Salário:Expira:Ações:
85 | R$
98 | 99 | 100 |
101 | 102 | 106 | 107 | 108 | 109 | 110 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /ETAPA-03/AppRH/AppRH/src/test/java/com/AppRH/AppRH/AppRhApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class AppRhApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-03/TemplateCodigosEArquivos-03/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FilosoDev/Spring-Boot-tutorial-AppRh/43ae5345f910fb96f5dca47e4417056bece0d335/ETAPA-04/AppRH/AppRH/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.3/apache-maven-3.8.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.springframework.boot 8 | spring-boot-starter-parent 9 | 2.6.1 10 | 11 | 12 | com.AppRH 13 | AppRH 14 | 0.0.1-SNAPSHOT 15 | AppRH 16 | Projeto AppRH 17 | 18 | 11 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-security 24 | 25 | 26 | org.thymeleaf.extras 27 | thymeleaf-extras-springsecurity5 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-test 32 | test 33 | 34 | 35 | org.springframework.security 36 | spring-security-test 37 | test 38 | 39 | 40 | 41 | org.springframework.boot 42 | spring-boot-starter-data-jpa 43 | 44 | 45 | org.springframework.boot 46 | spring-boot-starter-thymeleaf 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-starter-web 51 | 52 | 53 | 54 | org.springframework.boot 55 | spring-boot-devtools 56 | runtime 57 | true 58 | 59 | 60 | org.springframework.boot 61 | spring-boot-starter-test 62 | test 63 | 64 | 65 | 66 | mysql 67 | mysql-connector-java 68 | runtime 69 | 70 | 71 | 72 | org.springframework.boot 73 | spring-boot-starter-validation 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | org.springframework.boot 83 | spring-boot-maven-plugin 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/AppRhApplication.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class AppRhApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(AppRhApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/DataConfiguration.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import javax.sql.DataSource; 4 | 5 | import org.springframework.context.annotation.Bean; 6 | import org.springframework.context.annotation.Configuration; 7 | import org.springframework.jdbc.datasource.DriverManagerDataSource; 8 | import org.springframework.orm.jpa.JpaVendorAdapter; 9 | import org.springframework.orm.jpa.vendor.Database; 10 | import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; 11 | 12 | @Configuration 13 | public class DataConfiguration { 14 | 15 | @Bean 16 | public DataSource dataSource() { 17 | DriverManagerDataSource dataSource = new DriverManagerDataSource(); 18 | dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); 19 | dataSource.setUrl("jdbc:mysql://localhost:3306/AppRH?useTimezone=true&serverTimezone=UTC"); 20 | dataSource.setUsername("root"); // usuário do SEU banco de dados 21 | dataSource.setPassword("admin"); // senha do SEU banco de dados 22 | return dataSource; 23 | } 24 | 25 | @Bean 26 | public JpaVendorAdapter jpaVendorAdapter() { 27 | HibernateJpaVendorAdapter adapter = new HibernateJpaVendorAdapter(); 28 | adapter.setDatabase(Database.MYSQL); 29 | adapter.setShowSql(true); // mostra execução do sql 30 | adapter.setGenerateDdl(true); 31 | adapter.setDatabasePlatform("org.hibernate.dialect.MariaDBDialect"); 32 | adapter.setPrepareConnection(true); 33 | return adapter; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/WebConfig.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; 6 | import org.springframework.security.config.annotation.web.builders.HttpSecurity; 7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; 8 | 9 | @Configuration 10 | public class WebConfig extends WebSecurityConfigurerAdapter { 11 | 12 | // Método que configura usuários e escopo de atuação no sistema 13 | @Autowired 14 | public void configureGlobal(AuthenticationManagerBuilder builder)throws Exception{ 15 | 16 | builder 17 | .inMemoryAuthentication() 18 | .withUser("arthur").password("{noop}arthur").roles("USER") 19 | .and().withUser("root").password("{noop}root").roles("ADMIN"); 20 | 21 | } 22 | 23 | // Método que configura quais seções do site podem ser acessadas com e sem login 24 | protected void configure(HttpSecurity http) throws Exception{ 25 | 26 | http 27 | .authorizeRequests().antMatchers("/").permitAll() 28 | .antMatchers("/vagas**").permitAll() 29 | .antMatchers("/home**").permitAll().anyRequest() 30 | .authenticated().and().formLogin().permitAll() 31 | .and().logout().permitAll() 32 | .and().csrf().disable(); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/controllers/BuscaController.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.controllers; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.RequestAttribute; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.RequestParam; 9 | import org.springframework.web.servlet.ModelAndView; 10 | 11 | import com.AppRH.AppRH.models.Candidato; 12 | import com.AppRH.AppRH.models.Dependente; 13 | import com.AppRH.AppRH.models.Funcionario; 14 | import com.AppRH.AppRH.models.Vaga; 15 | 16 | import com.AppRH.AppRH.repository.FuncionarioRepository; 17 | import com.AppRH.AppRH.repository.VagaRepository; 18 | import com.AppRH.AppRH.repository.DependenteRepository; 19 | import com.AppRH.AppRH.repository.CandidatoRepository; 20 | 21 | @Controller 22 | public class BuscaController { 23 | 24 | @Autowired 25 | private FuncionarioRepository fr; 26 | 27 | @Autowired 28 | private VagaRepository vr; 29 | 30 | @Autowired 31 | private DependenteRepository dr; 32 | 33 | @Autowired 34 | private CandidatoRepository cr; 35 | 36 | //GET 37 | @RequestMapping("/") 38 | public ModelAndView abrirIndex() { 39 | ModelAndView mv = new ModelAndView("index"); 40 | return mv; 41 | } 42 | 43 | //POST 44 | @RequestMapping(value = "/", method = RequestMethod.POST) 45 | public ModelAndView buscarIndex(@RequestParam("buscar") String buscar, @RequestParam("nome") String nome) { 46 | 47 | ModelAndView mv = new ModelAndView("index"); 48 | String mensagem = "Resultados da busca por " + buscar; 49 | 50 | if(nome.equals("nomefuncionario")) { 51 | mv.addObject("funcionarios", fr.findByNomes(buscar)); 52 | 53 | }else if(nome.equals("nomedependente")) { 54 | mv.addObject("dependentes", dr.findByNomesDependentes(buscar)); 55 | 56 | }else if(nome.equals("nomecandidato")) { 57 | mv.addObject("candidatos", cr.findByNomesCandidatos(buscar)); 58 | 59 | }else if(nome.equals("titulovaga")) { 60 | mv.addObject("vagas", vr.findByNomesVaga(buscar)); 61 | 62 | }else { 63 | mv.addObject("funcionarios", fr.findByNomes(buscar)); 64 | mv.addObject("dependentes", dr.findByNomesDependentes(buscar)); 65 | mv.addObject("candidatos", cr.findByNomesCandidatos(buscar)); 66 | mv.addObject("vagas", vr.findByNomesVaga(buscar)); 67 | } 68 | 69 | mv.addObject("mensagem", mensagem); 70 | 71 | return mv; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Candidato.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.ManyToOne; 9 | import javax.validation.constraints.NotEmpty; 10 | 11 | @Entity 12 | public class Candidato { 13 | 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.IDENTITY) 16 | private long id; 17 | 18 | @Column(unique = true) 19 | private String rg; 20 | 21 | @NotEmpty 22 | private String nomeCandidato; 23 | 24 | @NotEmpty 25 | private String email; 26 | 27 | @ManyToOne 28 | private Vaga vaga; 29 | 30 | public String getRg() { 31 | return rg; 32 | } 33 | 34 | public void setRg(String rg) { 35 | this.rg = rg; 36 | } 37 | 38 | public String getNomeCandidato() { 39 | return nomeCandidato; 40 | } 41 | 42 | public void setNomeCandidato(String nomeCandidato) { 43 | this.nomeCandidato = nomeCandidato; 44 | } 45 | 46 | public String getEmail() { 47 | return email; 48 | } 49 | 50 | public void setEmail(String email) { 51 | this.email = email; 52 | } 53 | 54 | public Vaga getVaga() { 55 | return vaga; 56 | } 57 | 58 | public void setVaga(Vaga vaga) { 59 | this.vaga = vaga; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Dependente.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import javax.persistence.Id; 4 | import javax.persistence.GeneratedValue; 5 | import javax.persistence.GenerationType; 6 | import javax.persistence.Entity; 7 | import javax.persistence.Column; 8 | import javax.persistence.ManyToOne; 9 | 10 | 11 | @Entity 12 | public class Dependente { 13 | 14 | @Id 15 | @GeneratedValue(strategy = GenerationType.IDENTITY) 16 | private long id; 17 | 18 | @Column(unique = true) 19 | private String cpf; 20 | 21 | private String nome; 22 | private String datanascimento; 23 | 24 | @ManyToOne 25 | private Funcionario funcionario; 26 | 27 | public String getCpf() { 28 | return cpf; 29 | } 30 | 31 | public void setCpf(String cpf) { 32 | this.cpf = cpf; 33 | } 34 | 35 | public String getNome() { 36 | return nome; 37 | } 38 | 39 | public void setNome(String nome) { 40 | this.nome = nome; 41 | } 42 | 43 | public String getDatanascimento() { 44 | return datanascimento; 45 | } 46 | 47 | public void setDatanascimento(String datanascimento) { 48 | this.datanascimento = datanascimento; 49 | } 50 | 51 | public Funcionario getFuncionario() { 52 | return funcionario; 53 | } 54 | 55 | public void setFuncionario(Funcionario funcionario) { 56 | this.funcionario = funcionario; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Funcionario.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | 6 | import javax.persistence.CascadeType; 7 | import javax.persistence.Entity; 8 | import javax.persistence.GeneratedValue; 9 | import javax.persistence.GenerationType; 10 | import javax.persistence.Id; 11 | import javax.persistence.OneToMany; 12 | 13 | 14 | @Entity 15 | public class Funcionario implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | private long id; 22 | 23 | private String nome; 24 | private String data; 25 | private String email; 26 | 27 | @OneToMany(mappedBy = "funcionario", cascade = CascadeType.REMOVE) 28 | private Listdependentes; 29 | 30 | public long getId() { 31 | return id; 32 | } 33 | 34 | public void setId(long id) { 35 | this.id = id; 36 | } 37 | 38 | public String getNome() { 39 | return nome; 40 | } 41 | 42 | public void setNome(String nome) { 43 | this.nome = nome; 44 | } 45 | 46 | public String getData() { 47 | return data; 48 | } 49 | 50 | public void setData(String data) { 51 | this.data = data; 52 | } 53 | 54 | public String getEmail() { 55 | return email; 56 | } 57 | 58 | public void setEmail(String email) { 59 | this.email = email; 60 | } 61 | 62 | public List getDependentes() { 63 | return dependentes; 64 | } 65 | 66 | public void setDependentes(List dependentes) { 67 | this.dependentes = dependentes; 68 | } 69 | 70 | } 71 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/models/Vaga.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.models; 2 | 3 | import java.io.Serializable; 4 | import java.util.List; 5 | import javax.persistence.CascadeType; 6 | import javax.persistence.Entity; 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | 12 | import javax.validation.constraints.NotEmpty; 13 | 14 | @Entity 15 | public class Vaga implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | @Id 20 | @GeneratedValue(strategy = GenerationType.IDENTITY) 21 | private long codigo; 22 | 23 | @NotEmpty 24 | private String nome; 25 | 26 | @NotEmpty 27 | private String descricao; 28 | 29 | @NotEmpty 30 | private String data; 31 | 32 | @NotEmpty 33 | private String salario; 34 | 35 | @OneToMany(mappedBy = "vaga", cascade = CascadeType.REMOVE) 36 | private List candidatos; 37 | 38 | public long getCodigo() { 39 | return codigo; 40 | } 41 | 42 | public void setCodigo(long codigo) { 43 | this.codigo = codigo; 44 | } 45 | 46 | public String getNome() { 47 | return nome; 48 | } 49 | 50 | public void setNome(String nome) { 51 | this.nome = nome; 52 | } 53 | 54 | public String getDescricao() { 55 | return descricao; 56 | } 57 | 58 | public void setDescricao(String descricao) { 59 | this.descricao = descricao; 60 | } 61 | 62 | public String getData() { 63 | return data; 64 | } 65 | 66 | public void setData(String data) { 67 | this.data = data; 68 | } 69 | 70 | public String getSalario() { 71 | return salario; 72 | } 73 | 74 | public void setSalario(String salario) { 75 | this.salario = salario; 76 | } 77 | 78 | public List getCandidatos() { 79 | return candidatos; 80 | } 81 | 82 | public void setCandidatos(List candidatos) { 83 | this.candidatos = candidatos; 84 | } 85 | 86 | } 87 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/CandidatoRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | import com.AppRH.AppRH.models.Candidato; 8 | import com.AppRH.AppRH.models.Vaga; 9 | 10 | public interface CandidatoRepository extends CrudRepository { 11 | 12 | Iterable findByVaga(Vaga vaga); 13 | 14 | // para deletar pelo RG 15 | Candidato findByRg(String rg); 16 | 17 | Candidato findById(long id); 18 | 19 | // Query para a busca 20 | @Query(value = "select u from Candidato u where u.nomeCandidato like %?1%") 21 | List findByNomesCandidatos(String nomeCandidato); 22 | } 23 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/DependenteRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Dependente; 9 | import com.AppRH.AppRH.models.Funcionario; 10 | 11 | public interface DependenteRepository extends CrudRepository { 12 | 13 | Iterable findByFuncionario(Funcionario funcionario); 14 | 15 | // para o método delete por CPF 16 | Dependente findByCpf(String cpf); 17 | 18 | Dependente findById(long id); 19 | List findByNome(String nome); 20 | 21 | // Query para a busca 22 | @Query(value = "select u from Dependente u where u.nome like %?1%") 23 | List findByNomesDependentes(String nome); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/FuncionarioRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.Query; 6 | import org.springframework.data.repository.CrudRepository; 7 | 8 | import com.AppRH.AppRH.models.Funcionario; 9 | 10 | public interface FuncionarioRepository extends CrudRepository{ 11 | 12 | Funcionario findById(long id); 13 | Funcionario findByNome(String nome); 14 | 15 | // Query para a busca 16 | @Query(value = "select u from Funcionario u where u.nome like %?1%") 17 | ListfindByNomes(String nome); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/java/com/AppRH/AppRH/repository/VagaRepository.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH.repository; 2 | 3 | import java.util.List; 4 | import org.springframework.data.jpa.repository.Query; 5 | import org.springframework.data.repository.CrudRepository; 6 | 7 | import com.AppRH.AppRH.models.Vaga; 8 | 9 | public interface VagaRepository extends CrudRepository { 10 | Vaga findByCodigo(long codigo); 11 | 12 | List findByNome(String nome); 13 | 14 | // Query para a busca 15 | @Query(value = "select u from Vaga u where u.nome like %?1%") 16 | List findByNomesVaga(String nome); 17 | } 18 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | spring.datasource.url=jdbc:mysql://localhost:3306/apprh 3 | spring.datasource.username=root 4 | spring.datasource.password=admin 5 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 6 | spring.jpa.database-platform = org.hibernate.dialect.MariaDBDialect 7 | spring.jpa.generate-ddl=true 8 | spring.jpa.hibernate.ddl-auto = update 9 | 10 | #spring.security.user.name=admin 11 | #spring.security.user.password=admin 12 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/resources/static/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/resources/templates/funcionario/form-funcionario.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | | App RH - UC 12 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 | 60 | 61 |
62 | 63 | 64 | 65 |
66 | 67 |

Cadastro de Funcionário

68 | 69 |
70 | 71 | 72 | 73 |
74 | 75 |
76 | 79 | * Nome completo. 80 |
81 | 82 |
83 |
84 | 85 |
86 | 88 | * Dia/Mês/Ano. 89 |
90 |
91 |
92 | 95 |
96 | 97 |
98 | 100 |
101 | 102 |
103 |
104 | 105 | 106 | 107 | 108 |
109 | 110 | 111 | 112 |
113 | 114 | 118 | 119 | 120 | 121 | 122 | 123 | 129 | 130 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/main/resources/templates/mensagem-validacao.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | | App RH - UC 12 | 7 | 8 | 9 | 10 | 15 | 16 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /ETAPA-04/AppRH/AppRH/src/test/java/com/AppRH/AppRH/AppRhApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.AppRH.AppRH; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class AppRhApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /ETAPA-04/Tutorial Seguranca de Spring Security.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FilosoDev/Spring-Boot-tutorial-AppRh/43ae5345f910fb96f5dca47e4417056bece0d335/ETAPA-04/Tutorial Seguranca de Spring Security.docx -------------------------------------------------------------------------------- /ETAPA-04/dados_funcionarios_vagas.sql: -------------------------------------------------------------------------------- 1 | USE apprh; 2 | 3 | -- INSERÇÃO DE VAGAS 4 | INSERT INTO `vaga` VALUES 5 | (1,'2021-11-13','Profissional que tenha atuação FullStack em programação com a linguagem C .NET, Banco de Dados SQL Server, Arquitetura MVC e Microserviços (WebAPIs). Vivência com Front end e Back end. Experiência com .NET Core, metodologia Ágil Scrum, WEB Forms.','Programador - Desenvolvedor C# Net','12000'), 6 | (2,'2021-12-11','Sólida experiência com DevOps; Experiência em soluções e arquitetura Cloud, AWS, Kubernetes, Docker, Banco de Dados, Jenkins; Conhecimento em estratégias e técnicas de monitoramento; Experiência com padrões de arquitetura: SOA, MVC etc.','Analista Devops','5000'), 7 | (3,'2021-12-11','Net Core, Vue.js/React/Angular.','Desenvolvedor FullStack Pleno/Sênior','9000'), 8 | (4,'2022-12-11','Área e especialização profissional: Informática, TI, Telecomunicações - Montagem e Manutenção de Micros. Teste, manutenção e montagem de servidores, switches, blade server, storage, roteadores.','Técnico De Hardware - Montagem E Manutenção','5000'), 9 | (5,'2022-12-04','Tomar a frente das equipes de TI, Operações e Marketing da empresa.\r\nElaborar projetos e campanhas, afim de atender as metas e indicadores.','Gerente De Ecommerce','9000'), 10 | (6,'2022-11-26','Apoiar no desenvolvimento de sites, hotsites, desenvolvimento de identidade visual de sistemas, atuar na criação de artes para empresas, tratamento de imagem, criação de logotipo, editoração, ilustração, folder, web, desenvolver anúncios etc.','Estagiário de Web Design','7000'), 11 | (7,'2022-12-10','Realizar o desenvolvimento em ADVPL, TOTVS DevStudio e demais ferramentas da plataforma; SQL Server e linguagem SQL. ','Analista Desenvolvedor Protheus','8000'), 12 | (8,'2022-11-27','ASP.NET Developer / Research + Development at BD. We are looking for outstanding ASP.NET Developers to join BD Research & Development Team (R&D).','Asp.Net Developer / Research + Development - Remote Work ','7000'), 13 | (9,'2022-11-27','Organizar as informações, criar diretórios e subdiretórios, cuidar da segurança dos arquivos, gerenciar as licenças e determinar quem tem acesso a cada tipo de arquivo e fazer backup do servidor.','Administrador de banco de dados','5000'), 14 | (10,'2022-11-27','Mobile NativeScript Developer Senior at BD.','Mobile Nativescript Developer Senior - Remote Work ','9000'), 15 | (11,'2022-11-27','Gerenciar toda a área TI da empresa, que está subdividida em três partes: sistemas; infraestrutura e segurança.','Gerente de TI','9000'); 16 | 17 | -- INSERÇÃO DE FUNCIONÁRIOS 18 | INSERT INTO `funcionario` VALUES 19 | (1,'1955-10-28','bill@microsoft.com','William Henry Gates III'), 20 | (2,'1815-12-10','ada@ada.language.com','Ada Lovelace'), 21 | (3,'1969-12-28','torvalds@osdl.org','Linus Torvalds'), 22 | (4,'1906-12-09','grace.hopper@cobol.com','Grace Hopper'), 23 | (5,'1953-03-16','rms@gnu.org','Richard Stallman'), 24 | (6,'1955-01-01','carol@atari.games.com','Carol Shaw'), 25 | (7,'1950-08-11','teamwoz@woz.org','Steve Wozniak'), 26 | (8,'1932-08-04','f.allen@parallel.computing.com','Frances Allen'), 27 | (9,'1955-05-19','jamesgosling@gmail.com','James Gosling'), 28 | (10,'1977-06-16','larry.ellison@oracle.com','Larry Ellison'), 29 | (11,'1961-07-04','brendan@mozilla.com','Brendan Eich'), 30 | (12,'1918-08-26','k.apolo11@nasa.us','Katherine Johnson'), 31 | (13,'1941-09-09','ritchie@clanguage.com','Dennis Ritchie'), 32 | (14,'2009-01-01','bitcoin@bitcoin.com','Satoshi Nakamoto'), 33 | (15,'1912-06-23','a.turing@godofrbots.com','Alan Turing'); 34 | 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Arthur A. Ferreira 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # App RH *versão 1.0* para estudos na UC 12 2 | ## Java com SPRING-BOOT 3 | 4 | Sistema de RH desenvolvido no tutorial (YouTube) sobre Spring Boot. 5 | 6 | **1ª Fase** - Criação do projeto e módulo *Vagas/Candidatos* :heavy_check_mark: 7 | 8 | [Playlist da Etapa 01 no YouTube](https://youtube.com/playlist?list=PLvtOeOw_Op8k8p6vw-ADaHcKavUnZaGk8) 9 | 10 | 11 | 12 | **2ª Fase** - Módulo *Funcionários/Dependentes* :heavy_check_mark: 13 | 14 | [Playlist da Etapa 02 no YouTube](https://youtube.com/playlist?list=PLvtOeOw_Op8kOkDWzFNb-N4gevX4e3l5J) 15 | 16 | 17 | 18 | **3ª Fase** - Implementação do *Formulário de Busca* na página inicial. :heavy_check_mark: 19 | 20 | [Playlist da Etapa 03 no YouTube](https://youtube.com/playlist?list=PLvtOeOw_Op8kQfcjW0Om23Z0GWBbOMfj5) 21 | 22 | 23 | 24 | **4ª Fase** - Implementação do *Security* no sistema e outros extras. :heavy_check_mark: 25 | 26 | [Playlist da Etapa 04 no YouTube](https://youtube.com/playlist?list=PLvtOeOw_Op8kRaARemNCorEhy2kpi2LQU) 27 | 28 | 29 | 30 | 31 | ### Instruções de instalação e uso: 32 | 33 | 1º No MySQL criar um banco com o nome **AppRH**; 34 | 35 | 2º No Eclipse, ir em *file*, *importar*, escolher opção *Maven*, *Existing Maven Projects*, *next*, selecione a pasta do seu projeto em *browser*, marque a opção em Projects *seuProjeto.jar* e *finish*; 36 | 37 | 4º Ainda no Eclipse, acessar o arquivo DataConfiguration.java e mudar usuário e senha de acordo com o seu banco de dados. Fazer a mesma coisa no arquivo application.properties que está na pasta src/main/resources; 38 | 39 | 5º Para executar o projeto no Eclipse, escolher *Run RhappApplication* e executar como uma aplicação Java; 40 | 41 | 6º Acessar em: http://localhost:8080/ 42 | 43 | 44 | Obs.: O projeto *não funciona* se não existir um banco (vazio) chamado AppRH no MySQL. 45 | 46 | 47 | --------------------------------------------------------------------------------