Skip to content
Snippets Groups Projects
Commit 2373add3 authored by BADRI Rym's avatar BADRI Rym
Browse files

Add images, icons, and class files for job management application

parent 88501004
No related branches found
No related tags found
No related merge requests found
Showing
with 36 additions and 3 deletions
...@@ -50,7 +50,8 @@ public class JobOfferDao { ...@@ -50,7 +50,8 @@ public class JobOfferDao {
logger.log(Level.INFO, "Finding JobOffer with id: " + id); logger.log(Level.INFO, "Finding JobOffer with id: " + id);
return entityManager.find(JobOffer.class, id); return entityManager.find(JobOffer.class, id);
} }
//commentaire
@Transactional(readOnly = true) @Transactional(readOnly = true)
public Long count() { public Long count() {
return entityManager.createQuery("SELECT COUNT(j) FROM JobOffer j", Long.class) return entityManager.createQuery("SELECT COUNT(j) FROM JobOffer j", Long.class)
...@@ -60,8 +61,8 @@ public class JobOfferDao { ...@@ -60,8 +61,8 @@ public class JobOfferDao {
@Transactional(readOnly = true) @Transactional(readOnly = true)
public List<JobOffer> findAll(String sort, String order) { public List<JobOffer> findAll(String sort, String order) {
// Vérification des champs autorisés // Vérification des champs autorisés
String allowedSortFields = "id,title,publicationdate"; List<String> allowedSortFields = List.of("id", "title", "publicationdate");
if (!allowedSortFields.contains(sort)) { if (!allowedSortFields.contains(sort.toLowerCase())) {
logger.log(Level.WARNING, "Invalid sort field: " + sort); logger.log(Level.WARNING, "Invalid sort field: " + sort);
sort = "id"; // Valeur par défaut sort = "id"; // Valeur par défaut
} }
......
spring.datasource.url=jdbc:postgresql://0.0.0.0:5432/jobmngt_db
spring.datasource.username=pguser
spring.datasource.password=pgpwd
spring.datasource.driver-class-name=org.postgresql.Driver
##hibernate configuration
spring.jpa.hibernate.ddl-auto=update
#update or create
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
#logging.level.org.hibernate.type=trace
##Turn Statistics on and log SQL stmts
spring.jpa.show-sql=true
#spring.jpa.properties.hibernate.format_sql=true
##If want to see very extensive logging
#spring.jpa.properties.hibernate.generate_statistics=true
logging.level.root=info
logging.level.org.springframework.web=debug
spring.jackson.serialization.indent_output=true
# Session timeout in seconds
server.servlet.session.timeout=10m
server.servlet.session.cookie.max-age=10m
# Environment variable
jobmngt.admin=007
spring.thymeleaf.cache=false
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment