Commit 31173087 by willgonzz

Filtro de postulantes que hayan tenido experiencia en un cargo

parent c492342c
......@@ -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";
......
......@@ -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<Experiencia,Long> {
public List<Experiencia> findByCargoLike(String cargo);
}
<%@ 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" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cargo</title>
</head>
<body>
<h1>Hola</h1>
<c:forEach var="i" items="${postu}">
<tr>
<td>- ${i.getPostulante().getNombre()}</td>
</tr>
<br/>
</c:forEach>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment