Skip to content

Commit

Permalink
fix typos[skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
awxiaoxian2020 committed Feb 5, 2023
1 parent 563045f commit de678a1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 16 deletions.
2 changes: 0 additions & 2 deletions src/site/markdown/dynamic-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ The Dynamic SQL elements should be familiar to anyone who has used JSTL or any s
- trim (where, set)
- foreach



### if

The most common thing to do in dynamic SQL is conditionally include a part of a where clause. For example:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Every MyBatis application centers around an instance of SqlSessionFactory. A Sql

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.

```
```java
String resource = "org/mybatis/example/mybatis-config.xml";
InputStream inputStream = Resources.getResourceAsStream(resource);
SqlSessionFactory sqlSessionFactory =
Expand Down
12 changes: 1 addition & 11 deletions src/site/markdown/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ To see MyBatis logging statements you may enable logging on a package, a mapper

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.



#### Step 1: Add the SLF4J + Logback JAR files

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.
Expand All @@ -68,8 +66,6 @@ If you use the maven, you can download jar files by adding following settings on
</dependency>
```



#### Step 2: Configure Logback

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

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.



#### Configuration example for Log4j 2

```xml
pom.xml
<!-- pom.xml -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
Expand All @@ -198,8 +192,6 @@ log4j2.xml
</Configuration>
```



#### Configuration example for Log4j

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



#### Configuration example for JDK logging

```properties
Expand Down
3 changes: 1 addition & 2 deletions src/site/markdown/statement-builders.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,5 @@ private String selectPersonSql() {
ORDER_BY("P.ID");
ORDER_BY("P.FULL_NAME");
return SQL();
}

}
```

0 comments on commit de678a1

Please sign in to comment.