From 311730870ce5613d75bded9474eb6c6132248b3d Mon Sep 17 00:00:00 2001 From: willgonzz Date: Thu, 4 Nov 2021 08:29:50 -0300 Subject: [PATCH] Filtro de postulantes que hayan tenido experiencia en un cargo --- curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java | 3 +++ curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java | 6 ++++-- curriculumsearch/src/main/webapp/jsp/cargo.jsp | 21 +++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 curriculumsearch/src/main/webapp/jsp/cargo.jsp diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 7e4eec7..45cf9be 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -5,6 +5,7 @@ import javax.validation.ConstraintViolationException; import com.roshka.modelo.Postulante; +import com.roshka.repositorio.ExperienciaRepository; import com.roshka.repositorio.PostulanteRepository; import com.roshka.repositorio.TecnologiaRepository; @@ -25,6 +26,8 @@ public class PostulanteController { @Autowired TecnologiaRepository tecRepo; + @Autowired + ExperienciaRepository expRepo; @RequestMapping("/") public String index() { return "index"; diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java index 8815d3b..cebad2a 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java @@ -2,9 +2,11 @@ package com.roshka.repositorio; import org.springframework.data.jpa.repository.JpaRepository; + +import java.util.List; + import com.roshka.modelo.Experiencia; public interface ExperienciaRepository extends JpaRepository { - - + public List findByCargoLike(String cargo); } diff --git a/curriculumsearch/src/main/webapp/jsp/cargo.jsp b/curriculumsearch/src/main/webapp/jsp/cargo.jsp new file mode 100644 index 0000000..f0fb286 --- /dev/null +++ b/curriculumsearch/src/main/webapp/jsp/cargo.jsp @@ -0,0 +1,21 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + + + + + Cargo + + +

Hola

+ + + - ${i.getPostulante().getNombre()} + +
+
+ + \ No newline at end of file -- libgit2 0.26.0