Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amparo Oliver
th-app-java
Commits
dca3cb01
Commit
dca3cb01
authored
Nov 03, 2021
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Listar postulantes por tecnologia
parent
c492342c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletions
+43
-1
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+12
-0
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
+10
-1
curriculumsearch/src/main/webapp/jsp/list-test.jsp
+21
-0
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
dca3cb01
...
...
@@ -15,6 +15,10 @@ import org.springframework.stereotype.Controller;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.servlet.ModelAndView
;
import
java.sql.SQLOutput
;
import
java.util.List
;
@Controller
...
...
@@ -64,4 +68,12 @@ public class PostulanteController {
.
body
(
ex
.
getMessage
());
}
@GetMapping
(
"/getPostulanteByTec_test/{name}"
)
public
ModelAndView
getPostTec
(
@PathVariable
(
"name"
)
String
name
){
System
.
out
.
println
(
name
);
ModelAndView
mv
=
new
ModelAndView
(
"list-test"
);
mv
.
addObject
(
"lista"
,
post
.
buscarPostulantesPorTecnologia
(
name
));
return
mv
;
}
}
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
View file @
dca3cb01
...
...
@@ -3,8 +3,17 @@ package com.roshka.repositorio;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
com.roshka.modelo.Postulante
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
public
interface
PostulanteRepository
extends
JpaRepository
<
Postulante
,
Long
>
{
@Query
(
"select p from Postulante p "
+
"JOIN PostulanteTecnologia pt ON pt.postulante.id = p.id "
+
"JOIN Tecnologia t ON t.id = pt.tecnologia.id "
+
"WHERE t.nombre = ?1"
)
public
List
<
Postulante
>
buscarPostulantesPorTecnologia
(
String
nombre
);
}
curriculumsearch/src/main/webapp/jsp/list-test.jsp
0 → 100644
View file @
dca3cb01
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<html>
<head>
<link
rel=
"stylesheet"
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity=
"sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"
crossorigin=
"anonymous"
>
<c:set
var=
"valores"
scope=
"session"
value=
"${{1, 2, 3, 4, 5, 6}}"
/>
</head>
<body>
<div
class=
"container"
>
<div
class=
"row mt-3"
><h2>
Lenguajes
</h2></div>
<div
class=
"row mt-3"
>
<ul>
<c:forEach
items=
"${lista}"
var=
"item"
>
<li>
${item.nombre}
</li>
</c:forEach>
</ul>
</div>
</div>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment