Skip to content

Commit 2a12196

Browse files
committed
alternatives to pr#3523
1 parent 60aea4a commit 2a12196

File tree

5 files changed

+36
-28
lines changed

5 files changed

+36
-28
lines changed

src/main/java/org/apache/ibatis/annotations/CacheNamespace.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@
3030
* <p>
3131
* <b>How to use:</b>
3232
*
33-
* <pre>{@code
34-
* @CacheNamespace(implementation = CustomCache.class, properties = {
35-
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
36-
* &#064;Property(name = "port", value = "${mybatis.cache.port}"), &#064;Property(name = "name", value = "usersCache") })
33+
* <pre>
34+
* <code>&#064;CacheNamespace(implementation = CustomCache.class, properties = {
35+
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
36+
* &#064;Property(name = "port", value = "${mybatis.cache.port}"),
37+
* &#064;Property(name = "name", value = "usersCache") })
3738
* public interface UserMapper {
3839
* // ...
3940
* }
40-
* }</pre>
41+
* </code>
42+
* </pre>
4143
*
4244
* @author Clinton Begin
4345
* @author Kazuki Shimizu

src/main/java/org/apache/ibatis/annotations/ConstructorArgs.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,16 @@
2626
* <p>
2727
* <b>How to use:</b>
2828
*
29-
* <pre>{@code
30-
* public interface UserMapper {
31-
* @ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
32-
* &#064;Arg(column = "name", javaType = String.class),
33-
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
29+
* <pre>
30+
* <code>public interface UserMapper {
31+
* &#064;ConstructorArgs({ &#064;Arg(column = "id", javaType = int.class, id = true),
32+
* &#064;Arg(column = "name", javaType = String.class),
33+
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id") })
3434
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3535
* User selectById(int id);
3636
* }
37-
* }</pre>
37+
* </code>
38+
* </pre>
3839
*
3940
* @author Clinton Begin
4041
*/

src/main/java/org/apache/ibatis/annotations/Select.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,25 @@
2929
* <ul>
3030
* <li>Simple:
3131
*
32-
* <pre>{@code
33-
* public interface UserMapper {
34-
* @Select("SELECT id, name FROM users WHERE id = #{id}")
32+
* <pre>
33+
* <code>public interface UserMapper {
34+
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3535
* User selectById(int id);
3636
* }
37-
* }</pre>
37+
* </code>
38+
* </pre>
3839
*
3940
* </li>
4041
* <li>Dynamic SQL:
4142
*
42-
* <pre>{@code
43-
* public interface UserMapper {
44-
* @Select({ "<script>", "select * from users", "where name = #{name}",
45-
* "<if test=\"age != null\"> age = #{age} </if>", "</script>" })
43+
* <pre>
44+
* <code>public interface UserMapper {
45+
* &#064;Select({ "&lt;script&gt;", "select * from users", "where name = #{name}",
46+
* "&lt;if test=\"age != null\"&gt; age = #{age} &lt;/if&gt;", "&lt;/script&gt;" })
4647
* User select(@NotNull String name, @Nullable Integer age);
4748
* }
48-
* }</pre>
49+
* </code>
50+
* </pre>
4951
*
5052
* </li>
5153
* </ul>

src/main/java/org/apache/ibatis/annotations/TypeDiscriminator.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@
3030
* <p>
3131
* <b>How to use:</b>
3232
*
33-
* <pre>{@code
34-
* public interface UserMapper {
33+
* <pre>
34+
* <code>public interface UserMapper {
3535
* &#064;Select("SELECT id, name, type FROM users ORDER BY id")
3636
* &#064;TypeDiscriminator(column = "type", javaType = String.class, cases = {
37-
* &#064;Case(value = "1", type = PremiumUser.class), &#064;Case(value = "2", type = GeneralUser.class),
38-
* &#064;Case(value = "3", type = TemporaryUser.class) })
37+
* &#064;Case(value = "1", type = PremiumUser.class),
38+
* &#064;Case(value = "2", type = GeneralUser.class),
39+
* &#064;Case(value = "3", type = TemporaryUser.class) })
3940
* List&lt;User&gt; selectAll();
4041
* }
41-
* }</pre>
42+
* </code>
43+
* </pre>
4244
*
4345
* @author Clinton Begin
4446
*/

src/main/java/org/apache/ibatis/plugin/Intercepts.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* <p>
2727
* <b>How to use:</b>
2828
*
29-
* <pre>{@code
30-
* @Intercepts({ &#064;Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
29+
* <pre>
30+
* <code>&#064;Intercepts({ &#064;Signature(type = Executor.class, method = "update", args = { MappedStatement.class, Object.class }) })
3131
* public class ExamplePlugin implements Interceptor {
3232
* &#064;Override
3333
* public Object intercept(Invocation invocation) throws Throwable {
@@ -37,7 +37,8 @@
3737
* return returnObject;
3838
* }
3939
* }
40-
* }</pre>
40+
* </code>
41+
* </pre>
4142
*
4243
* @author Clinton Begin
4344
*/

0 commit comments

Comments
 (0)