Polishing.

Code formatting.

Original pull request #2379
This commit is contained in:
Jens Schauder
2021-12-06 10:28:06 +01:00
parent 7509acde87
commit 732a25c7c7
2 changed files with 14 additions and 6 deletions

View File

@@ -186,7 +186,9 @@ public class MySqlStoredProcedureIntegrationTests {
List<Employee> entityListFromNamedProcedure();
}
@EnableJpaRepositories(considerNestedRepositories = true, basePackageClasses = Config.class,
@EnableJpaRepositories( //
considerNestedRepositories = true, //
basePackageClasses = Config.class, //
includeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = EmployeeRepositoryWithNoCursor.class))
@EnableTransactionManagement
static class Config {
@@ -194,14 +196,16 @@ public class MySqlStoredProcedureIntegrationTests {
@SuppressWarnings("resource")
@Bean(initMethod = "start")
public MySQLContainer<?> container() {
return new MySQLContainer<>("mysql:8.0.24") //
.withUsername("test") //
.withPassword("test") //
.withConfigurationOverride("");
.withUsername("test") //
.withPassword("test") //
.withConfigurationOverride("");
}
@Bean
public DataSource dataSource(MySQLContainer<?> container) {
MysqlDataSource dataSource = new MysqlDataSource();
dataSource.setUrl(container.getJdbcUrl());
dataSource.setUser(container.getUsername());

View File

@@ -152,8 +152,10 @@ public class PostgresStoredProcedureIntegrationTests {
@Entity
@AllArgsConstructor
@NoArgsConstructor
@NamedStoredProcedureQuery(name = "get_employees_postgres", procedureName = "get_employees",
parameters = { @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, type = void.class) },
@NamedStoredProcedureQuery( //
name = "get_employees_postgres", //
procedureName = "get_employees", //
parameters = { @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, type = void.class) }, //
resultClasses = Employee.class)
public static class Employee {
@@ -197,12 +199,14 @@ public class PostgresStoredProcedureIntegrationTests {
@SuppressWarnings("resource")
@Bean(initMethod = "start")
public PostgreSQLContainer<?> container() {
return new PostgreSQLContainer<>("postgres:9.6.12") //
.withUsername("postgres");
}
@Bean
public DataSource dataSource(PostgreSQLContainer<?> container) {
PGSimpleDataSource dataSource = new PGSimpleDataSource();
dataSource.setUrl(container.getJdbcUrl());
dataSource.setUser(container.getUsername());