Connexion BDD v1

This commit is contained in:
jleroy
2024-04-23 08:12:45 +02:00
parent 2fcafc0ea1
commit b253aa55b0
4 changed files with 46 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package fr.eni.enchere.dal;
import fr.eni.enchere.bo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
@@ -12,10 +13,12 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
@Primary
public class UserRepositoryImpl implements UserRepository {
private final JdbcTemplate jdbcTemplate;
private NamedParameterJdbcTemplate namedParameterJdbcTemplate;
@Autowired
public UserRepositoryImpl(JdbcTemplate jdbcTemplate, NamedParameterJdbcTemplate namedJdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;