Skip to content

Commit 0eff418

Browse files
committed
Merge branch 'master' into schema-provider
2 parents 9750e63 + bbcf4bb commit 0eff418

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,8 @@ an example from `examples.simple.SimpleTableAnnotatedMapperTest`:
254254
```java
255255
@Test
256256
public void testSelectByExample() {
257-
SqlSession session = sqlSessionFactory.openSession();
258-
try {
259-
SimpleTableXmlMapper mapper = session.getMapper(SimpleTableXmlMapper.class);
257+
try (SqlSession session = sqlSessionFactory.openSession()) {
258+
SimpleTableAnnotatedMapper mapper = session.getMapper(SimpleTableAnnotatedMapper.class);
260259

261260
SelectStatementProvider selectStatement = select(id.as("A_ID"), firstName, lastName, birthDate, employed, occupation)
262261
.from(simpleTable)
@@ -268,8 +267,6 @@ an example from `examples.simple.SimpleTableAnnotatedMapperTest`:
268267
List<SimpleTableRecord> rows = mapper.selectMany(selectStatement);
269268

270269
assertThat(rows.size()).isEqualTo(3);
271-
} finally {
272-
session.close();
273270
}
274271
}
275272
```

src/site/markdown/docs/quickStart.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@ an example from `examples.simple.SimpleTableAnnotatedMapperTest`:
138138
```java
139139
@Test
140140
public void testSelectByExample() {
141-
SqlSession session = sqlSessionFactory.openSession();
142-
try {
143-
SimpleTableXmlMapper mapper = session.getMapper(SimpleTableXmlMapper.class);
141+
try (SqlSession session = sqlSessionFactory.openSession()) {
142+
SimpleTableAnnotatedMapper mapper = session.getMapper(SimpleTableAnnotatedMapper.class);
144143

145144
SelectStatementProvider selectStatement = select(id.as("A_ID"), firstName, lastName, birthDate, employed, occupation)
146145
.from(simpleTable)
@@ -152,8 +151,6 @@ an example from `examples.simple.SimpleTableAnnotatedMapperTest`:
152151
List<SimpleTableRecord> rows = mapper.selectMany(selectStatement);
153152

154153
assertThat(rows.size()).isEqualTo(3);
155-
} finally {
156-
session.close();
157154
}
158155
}
159156
```

src/site/markdown/docs/springBatch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The `ItemReader` implementations need special care. Those classes assume that al
1414
The solution involves these steps:
1515

1616
1. The SQL must be rendered such that the parameter markers are aware of the enclosing parameter Map in the `ItemReader`
17-
1. The `SelectStatamentProvider` must be placed in the `ItemReader` parameter Map with a known key.
17+
1. The `SelectStatementProvider` must be placed in the `ItemReader` parameter Map with a known key.
1818
1. The `@SelectProvider` must be configured to be aware of the enclosing parameter Map
1919

2020
MyBatis Dynamic SQL provides utilities for each of these requirements. Each utility uses a shared Map key for consistency.

0 commit comments

Comments
 (0)