Skip to content

Commit 732a25c

Browse files
committed
Polishing.
Code formatting. Original pull request #2379
1 parent 7509acd commit 732a25c

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/test/java/org/springframework/data/jpa/repository/procedures/MySqlStoredProcedureIntegrationTests.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -186,22 +186,26 @@ public interface EmployeeRepositoryWithNoCursor extends JpaRepository<Employee,
186186
List<Employee> entityListFromNamedProcedure();
187187
}
188188

189-
@EnableJpaRepositories(considerNestedRepositories = true, basePackageClasses = Config.class,
189+
@EnableJpaRepositories( //
190+
considerNestedRepositories = true, //
191+
basePackageClasses = Config.class, //
190192
includeFilters = @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = EmployeeRepositoryWithNoCursor.class))
191193
@EnableTransactionManagement
192194
static class Config {
193195

194196
@SuppressWarnings("resource")
195197
@Bean(initMethod = "start")
196198
public MySQLContainer<?> container() {
199+
197200
return new MySQLContainer<>("mysql:8.0.24") //
198-
.withUsername("test") //
199-
.withPassword("test") //
200-
.withConfigurationOverride("");
201+
.withUsername("test") //
202+
.withPassword("test") //
203+
.withConfigurationOverride("");
201204
}
202205

203206
@Bean
204207
public DataSource dataSource(MySQLContainer<?> container) {
208+
205209
MysqlDataSource dataSource = new MysqlDataSource();
206210
dataSource.setUrl(container.getJdbcUrl());
207211
dataSource.setUser(container.getUsername());

src/test/java/org/springframework/data/jpa/repository/procedures/PostgresStoredProcedureIntegrationTests.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,10 @@ void testEntityListFromNamedProcedure() {
152152
@Entity
153153
@AllArgsConstructor
154154
@NoArgsConstructor
155-
@NamedStoredProcedureQuery(name = "get_employees_postgres", procedureName = "get_employees",
156-
parameters = { @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, type = void.class) },
155+
@NamedStoredProcedureQuery( //
156+
name = "get_employees_postgres", //
157+
procedureName = "get_employees", //
158+
parameters = { @StoredProcedureParameter(mode = ParameterMode.REF_CURSOR, type = void.class) }, //
157159
resultClasses = Employee.class)
158160
public static class Employee {
159161

@@ -197,12 +199,14 @@ static class Config {
197199
@SuppressWarnings("resource")
198200
@Bean(initMethod = "start")
199201
public PostgreSQLContainer<?> container() {
202+
200203
return new PostgreSQLContainer<>("postgres:9.6.12") //
201204
.withUsername("postgres");
202205
}
203206

204207
@Bean
205208
public DataSource dataSource(PostgreSQLContainer<?> container) {
209+
206210
PGSimpleDataSource dataSource = new PGSimpleDataSource();
207211
dataSource.setUrl(container.getJdbcUrl());
208212
dataSource.setUser(container.getUsername());

0 commit comments

Comments
 (0)