Skip to content

Commit 1a6011f

Browse files
fix typos[skip ci]
1 parent 563045f commit 1a6011f

File tree

4 files changed

+5
-20
lines changed

4 files changed

+5
-20
lines changed

src/site/markdown/dynamic-sql.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@ The Dynamic SQL elements should be familiar to anyone who has used JSTL or any s
1111
- trim (where, set)
1212
- foreach
1313

14-
15-
1614
### if
1715

1816
The most common thing to do in dynamic SQL is conditionally include a part of a where clause. For example:
1917

20-
```
18+
```xml
2119
<select id="findActiveBlogWithTitleLike"
2220
resultType="Blog">
2321
SELECT * FROM BLOG
@@ -69,8 +67,6 @@ Let’s use the example above, but now let’s search only on title if one is pr
6967
</select>
7068
```
7169

72-
73-
7470
### trim, where, set
7571

7672
The previous examples have been conveniently dancing around a notorious dynamic SQL challenge. Consider what would happen if we return to our "if" example, but this time we make "ACTIVE = 1" a dynamic condition as well.
@@ -160,7 +156,7 @@ Here, the *set* element will dynamically prepend the SET keyword, and also elimi
160156

161157
Alternatively, you can achieve the same effect by using *trim* element:
162158

163-
```
159+
```xml
164160
<trim prefix="SET" suffixOverrides=",">
165161
...
166162
</trim>

src/site/markdown/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Every MyBatis application centers around an instance of SqlSessionFactory. A Sql
2020

2121
Building a SqlSessionFactory instance from an XML file is very simple. It is recommended that you use a classpath resource for this configuration, but you could use any InputStream instance, including one created from a literal file path or a file:// URL. MyBatis includes a utility class, called Resources, that contains a number of methods that make it simpler to load resources from the classpath and other locations.
2222

23-
```
23+
```java
2424
String resource = "org/mybatis/example/mybatis-config.xml";
2525
InputStream inputStream = Resources.getResourceAsStream(resource);
2626
SqlSessionFactory sqlSessionFactory =

src/site/markdown/logging.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ To see MyBatis logging statements you may enable logging on a package, a mapper
5050

5151
Again, how you do this is dependent on the logging implementation in use. We'll show how to do it with SLF4J(Logback). Configuring the logging services is simply a matter of including one or more extra configuration files (e.g. `logback.xml`) and sometimes a new JAR file. The following example configuration will configure full logging services using SLF4J(Logback) as a provider. There are 2 steps.
5252

53-
54-
5553
#### Step 1: Add the SLF4J + Logback JAR files
5654

5755
Because we are using SLF4J(Logback), we will need to ensure its JAR file is available to our application. To use SLF4J(Logback), you need to add the JAR file to your application classpath.
@@ -68,8 +66,6 @@ If you use the maven, you can download jar files by adding following settings on
6866
</dependency>
6967
```
7068

71-
72-
7369
#### Step 2: Configure Logback
7470

7571
Configuring Logback is simple. Suppose you want to enable the log for this mapper:
@@ -167,12 +163,10 @@ Yes, as you may have noticed, there is no difference in configuring logging for
167163

168164
The remaining configuration in the `logback.xml` file is used to configure the appenders, which is beyond the scope of this document. However, you can find more information at the [Logback](https://logback.qos.ch/) website. Or, you could simply experiment with it to see what effects the different configuration options have.
169165

170-
171-
172166
#### Configuration example for Log4j 2
173167

174168
```xml
175-
pom.xml
169+
<!-- pom.xml -->
176170
<dependency>
177171
<groupId>org.apache.logging.log4j</groupId>
178172
<artifactId>log4j-core</artifactId>
@@ -198,8 +192,6 @@ log4j2.xml
198192
</Configuration>
199193
```
200194

201-
202-
203195
#### Configuration example for Log4j
204196

205197
```properties
@@ -219,8 +211,6 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
219211
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
220212
```
221213

222-
223-
224214
#### Configuration example for JDK logging
225215

226216
```properties

src/site/markdown/statement-builders.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,5 @@ private String selectPersonSql() {
619619
ORDER_BY("P.ID");
620620
ORDER_BY("P.FULL_NAME");
621621
return SQL();
622-
}
623-
622+
}
624623
```

0 commit comments

Comments
 (0)