docs: update repository

This commit is contained in:
Ilkka Seppälä
2024-05-18 18:28:10 +03:00
parent e731bdb998
commit f6d77a684e
3 changed files with 110 additions and 100 deletions
@@ -61,7 +61,7 @@ public class AppConfig {
}
/**
* Factory to create a especific instance of Entity Manager.
* Factory to create a specific instance of Entity Manager.
*/
@Bean
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
@@ -60,13 +60,15 @@ class AppConfigTest {
@Test
@Transactional
void testQuery() throws SQLException {
var resultSet = dataSource.getConnection().createStatement().executeQuery("SELECT 1");
var expected = "1";
String result = null;
while (resultSet.next()) {
result = resultSet.getString(1);
String expected;
String result;
try (var resultSet = dataSource.getConnection().createStatement().executeQuery("SELECT 1")) {
expected = "1";
result = null;
while (resultSet.next()) {
result = resultSet.getString(1);
}
}
assertEquals(expected, result);
}
}