Skip to content

Commit f0fd9fc

Browse files
AnatoliiStepaniukharawata
authored andcommitted
Fixed typos in documentation (#795)
English doc corrections and improvements.
1 parent 650e10d commit f0fd9fc

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/site/xdoc/configuration.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,14 +1534,14 @@ public class ExamplePlugin implements Interceptor {
15341534
</p>
15351535

15361536
<source><![CDATA[SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment);
1537-
SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment,properties);]]></source>
1537+
SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, environment, properties);]]></source>
15381538

15391539
<p>If the environment is omitted, then the default environment is
15401540
loaded, as follows:
15411541
</p>
15421542

15431543
<source><![CDATA[SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader);
1544-
SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader,properties);]]></source>
1544+
SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader, properties);]]></source>
15451545

15461546
<p>The environments element defines how the environment is
15471547
configured.
@@ -1841,8 +1841,8 @@ public class C3P0DataSourceFactory extends UnpooledDataSourceFactory {
18411841
MyBatis is able to execute different statements depending on your database vendor.
18421842
The multi-db vendor support is based on the mapped statements <code>databaseId</code> attribute.
18431843
MyBatis will load all statements with no <code>databaseId</code> attribute
1844-
or with a <code>databaseId</code> that matches the current one. If case the same statement
1845-
if found with and without the <code>databaseId</code> the latter will be discarded.
1844+
or with a <code>databaseId</code> that matches the current one. In case the same statement
1845+
is found with and without the <code>databaseId</code> the latter will be discarded.
18461846
To enable the multi vendor support add a <code>databaseIdProvider</code>
18471847
to mybatis-config.xml file as follows:
18481848
</p>
@@ -1888,7 +1888,7 @@ public class C3P0DataSourceFactory extends UnpooledDataSourceFactory {
18881888
statements. But first, we need to tell MyBatis where to find them.
18891889
Java doesn’t really provide any good means of auto-discovery in
18901890
this regard, so the best way to do it is to simply tell MyBatis
1891-
where to find the mapping files. You can use class path relative
1891+
where to find the mapping files. You can use classpath relative
18921892
resource references, fully qualified url references
18931893
(including <code>file:///</code> URLs), class names or package names.
18941894
For example:

src/site/xdoc/java-api.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ SqlSessionFactory factory = builder.build(configuration);</source>
146146
<p>Now you have a SqlSessionFactory that can be used to create SqlSession instances.</p>
147147

148148
<h4>SqlSessionFactory</h4>
149-
<p>SqlSessionFactory has six methods that are used to create SqlSessionInstances. In general, the decisions you'll be making when selecting one of these methods are:</p>
149+
<p>SqlSessionFactory has six methods that are used to create SqlSession instances. In general, the decisions you'll be making when selecting one of these methods are:</p>
150150
<ul>
151151
<li><strong>Transaction</strong>: Do you want to use a transaction scope for the session, or use auto-commit (usually means no transaction with most databases and/or JDBC drivers)?</li>
152152
<li><strong>Connection</strong>: Do you want MyBatis to acquire a Connection from the configured DataSource for you, or do you want to provide your own?</li>

src/site/xdoc/sqlmap-xml.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
The select statement is one of the most popular elements that you'll use in MyBatis.
8686
Putting data in a database isn't terribly valuable until you get it back out, so most
8787
applications query far more than they modify the data. For every insert, update or delete,
88-
there is probably many selects. This is one of the founding principles of MyBatis, and is the
88+
there are probably many selects. This is one of the founding principles of MyBatis, and is the
8989
reason so much focus and effort was placed on querying and result mapping. The select element is
9090
quite simple for simple cases. For example:
9191
</p>
@@ -541,7 +541,7 @@ ps.setInt(1,id);]]></source>
541541
<p>
542542
In all of the past statements, you've seen examples of simple parameters. Parameters are very
543543
powerful elements in MyBatis. For simple situations, probably 90% of the cases, there's not much
544-
too them, for example:
544+
to them, for example:
545545
</p>
546546

547547
<source><![CDATA[<select id="selectUsers" resultType="User">
@@ -552,7 +552,7 @@ ps.setInt(1,id);]]></source>
552552

553553
<p>
554554
The example above demonstrates a very simple named parameter mapping. The parameterType is set to
555-
<code>int</code>, so therefore the parameter could be named anything. Primitive or simply data types such as
555+
<code>int</code>, so therefore the parameter could be named anything. Primitive or simple data types such as
556556
<code>Integer</code> and <code>String</code> have no relevant properties, and thus will replace the full value of the
557557
parameter entirely. However, if you pass in a complex object, then the behavior is a little
558558
different. For example:
@@ -643,8 +643,8 @@ ps.setInt(1,id);]]></source>
643643
<p>
644644
By default, using the <code>#{}</code> syntax will cause MyBatis to generate <code>PreparedStatement</code> properties and
645645
set the values safely against the <code>PreparedStatement</code> parameters (e.g. ?). While this is safer,
646-
faster and almost always preferred, sometimes you just want to directly inject a string
647-
unmodified into the SQL Statement. For example, for ORDER BY, you might use something like this:
646+
faster and almost always preferred, sometimes you just want to directly inject an unmodified string
647+
into the SQL Statement. For example, for ORDER BY, you might use something like this:
648648
</p>
649649

650650
<source><![CDATA[ORDER BY ${columnName}]]></source>
@@ -731,7 +731,7 @@ public class User {
731731
</select>]]></source>
732732

733733
<p>
734-
And remember that TypeAliases are your friend. Use them so that you don't have to keep typing the
734+
And remember that TypeAliases are your friends. Use them so that you don't have to keep typing the
735735
fully qualified path of your class out. For example:
736736
</p>
737737

@@ -787,7 +787,7 @@ public class User {
787787
</select>]]></source>
788788

789789
<p>
790-
Now if only the world were always that simple.
790+
Now if only the world was always that simple.
791791
</p>
792792

793793
<h4>Advanced Result Maps</h4>
@@ -965,7 +965,7 @@ public class User {
965965
<result property="subject" column="post_subject"/>]]></source>
966966

967967
<p>
968-
These are the most basic of result mappings. Both <i>id</i>, and
968+
These are the most basic of result mappings. Both <i>id</i> and
969969
<i>result</i> map a single column value to a
970970
single property or field of a simple data type (String, int, double, Date, etc.).
971971
</p>
@@ -1756,7 +1756,7 @@ SELECT * FROM AUTHOR WHERE ID = #{id}]]></source>
17561756
<h4>Multiple ResultSets for Collection</h4>
17571757

17581758
<p>
1759-
As we did for the association, we can call an stored procedure that executes two queries and returns two result sets, one with Blogs
1759+
As we did for the association, we can call a stored procedure that executes two queries and returns two result sets, one with Blogs
17601760
and another with Posts:
17611761
</p>
17621762

0 commit comments

Comments
 (0)