use of org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory in project spring-data-jdbc by spring-projects.
the class SimpleJdbcRepositoryEventsUnitTests method before.
@Before
public void before() {
final JdbcMappingContext context = new JdbcMappingContext(createIdGeneratingOperations());
JdbcRepositoryFactory factory = new //
JdbcRepositoryFactory(//
publisher, //
context, new //
DefaultDataAccessStrategy(//
new SqlGeneratorSource(context), //
context));
repository = factory.getRepository(DummyEntityRepository.class);
}
use of org.springframework.data.jdbc.repository.support.JdbcRepositoryFactory in project spring-data-jdbc by spring-projects.
the class TestConfiguration method jdbcRepositoryFactory.
@Bean
JdbcRepositoryFactory jdbcRepositoryFactory(DataAccessStrategy dataAccessStrategy) {
NamedParameterJdbcOperations jdbcTemplate = namedParameterJdbcTemplate();
final JdbcMappingContext context = new JdbcMappingContext(NamingStrategy.INSTANCE, jdbcTemplate, __ -> {
});
return new //
JdbcRepositoryFactory(//
publisher, //
context, //
dataAccessStrategy);
}
Aggregations