Skip to content

Commit 9886f1d

Browse files
committed
Merge branch 'master' into pr/3108
2 parents f3a2432 + d21e71b commit 9886f1d

File tree

186 files changed

+686
-680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+686
-680
lines changed

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2009-2024 the original author or authors.
4+
Copyright 2009-2025 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
2929

3030
<groupId>org.mybatis</groupId>
3131
<artifactId>mybatis</artifactId>
32-
<version>3.5.18-SNAPSHOT</version>
32+
<version>3.6.0-SNAPSHOT</version>
3333

3434
<name>mybatis</name>
3535
<description>The MyBatis SQL mapper framework makes it easier to use a relational database with object-oriented
@@ -64,8 +64,8 @@
6464

6565
<properties>
6666
<!-- Java Usage -->
67-
<java.version>8</java.version>
68-
<java.release.version>8</java.release.version>
67+
<java.version>11</java.version>
68+
<java.release.version>11</java.release.version>
6969

7070
<!-- Override impsort comliance to 17 (remove after parent 49 release) -->
7171
<impsort.compliance>17</impsort.compliance>
@@ -99,7 +99,7 @@
9999
<argLine>-Xmx2048m -javaagent:${settings.localRepository}/net/bytebuddy/byte-buddy-agent/${byte-buddy.version}/byte-buddy-agent-${byte-buddy.version}.jar</argLine>
100100

101101
<!-- Reproducible Builds -->
102-
<project.build.outputTimestamp>1732629483</project.build.outputTimestamp>
102+
<project.build.outputTimestamp>1735704225</project.build.outputTimestamp>
103103
</properties>
104104

105105
<dependencies>

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,27 +25,23 @@
2525
import org.apache.ibatis.cache.decorators.LruCache;
2626
import org.apache.ibatis.cache.impl.PerpetualCache;
2727

28-
// @formatter:off
2928
/**
3029
* The annotation that specify to use cache on namespace(e.g. mapper interface).
3130
* <p>
3231
* <b>How to use:</b>
3332
*
34-
* <pre>
35-
* &#064;CacheNamespace(implementation = CustomCache.class, properties = {
36-
* &#064;Property(name = "host", value = "${mybatis.cache.host}"),
37-
* &#064;Property(name = "port", value = "${mybatis.cache.port}"),
38-
* &#064;Property(name = "name", value = "usersCache")
39-
* })
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") })
4037
* public interface UserMapper {
4138
* // ...
4239
* }
43-
* </pre>
40+
* }</pre>
4441
*
4542
* @author Clinton Begin
4643
* @author Kazuki Shimizu
4744
*/
48-
// @formatter:on
4945
@Documented
5046
@Retention(RetentionPolicy.RUNTIME)
5147
@Target(ElementType.TYPE)

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,27 +21,23 @@
2121
import java.lang.annotation.RetentionPolicy;
2222
import java.lang.annotation.Target;
2323

24-
// @formatter:off
2524
/**
2625
* The annotation that be grouping mapping definitions for constructor.
2726
* <p>
2827
* <b>How to use:</b>
2928
*
30-
* <pre>
29+
* <pre>{@code
3130
* public interface UserMapper {
32-
* &#064;ConstructorArgs({
33-
* &#064;Arg(column = "id", javaType = int.class, id = true),
34-
* &#064;Arg(column = "name", javaType = String.class),
35-
* &#064;Arg(javaType = UserEmail.class, select = "selectUserEmailById", column = "id")
36-
* })
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") })
3734
* &#064;Select("SELECT id, name FROM users WHERE id = #{id}")
3835
* User selectById(int id);
3936
* }
40-
* </pre>
37+
* }</pre>
4138
*
4239
* @author Clinton Begin
4340
*/
44-
// @formatter:on
4541
@Documented
4642
@Retention(RetentionPolicy.RUNTIME)
4743
@Target(ElementType.METHOD)

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

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,10 +27,10 @@
2727
* <p>
2828
* <b>How to use:</b>
2929
*
30-
* <pre>
30+
* <pre>{@code
3131
* public interface UserMapper {
3232
*
33-
* &#064;DeleteProvider(type = SqlProvider.class, method = "deleteById")
33+
* @DeleteProvider(type = SqlProvider.class, method = "deleteById")
3434
* boolean deleteById(int id);
3535
*
3636
* public static class SqlProvider {
@@ -40,7 +40,7 @@
4040
* }
4141
*
4242
* }
43-
* </pre>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -65,36 +65,30 @@
6565
* Specify a type that implements an SQL provider method.
6666
* <p>
6767
* This attribute is alias of {@link #value()}.
68-
* </p>
6968
*
7069
* @return a type that implements an SQL provider method
7170
*
7271
* @see #value()
7372
*/
7473
Class<?> type() default void.class;
7574

76-
// @formatter:off
7775
/**
7876
* Specify a method for providing an SQL.
7977
* <p>
8078
* Since 3.5.1, this attribute can omit.
8179
* <p>
8280
* If this attribute omit, the MyBatis will call a method that decide by following rules.
8381
* <ul>
84-
* <li>
85-
* If class that specified the {@link #type()} attribute implements the
86-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
87-
* the MyBatis use a method that returned by it
88-
* </li>
89-
* <li>
90-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}(= not implement it or it was returned {@code null}),
91-
* the MyBatis will search and use a fallback method that named {@code provideSql} from specified type
92-
* </li>
82+
* <li>If class that specified the {@link #type()} attribute implements the
83+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
84+
* </li>
85+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
86+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
87+
* <code>provideSql</code> from specified type</li>
9388
* </ul>
9489
*
9590
* @return a method name of method for providing an SQL
9691
*/
97-
// @formatter:on
9892
String method() default "";
9993

10094
/**

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

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,10 +27,10 @@
2727
* <p>
2828
* <b>How to use:</b>
2929
*
30-
* <pre>
30+
* <pre>{@code
3131
* public interface UserMapper {
3232
*
33-
* &#064;InsertProvider(type = SqlProvider.class, method = "insert")
33+
* @InsertProvider(type = SqlProvider.class, method = "insert")
3434
* void insert(User user);
3535
*
3636
* public static class SqlProvider {
@@ -40,7 +40,7 @@
4040
* }
4141
*
4242
* }
43-
* </pre>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -65,36 +65,30 @@
6565
* Specify a type that implements an SQL provider method.
6666
* <p>
6767
* This attribute is alias of {@link #value()}.
68-
* </p>
6968
*
7069
* @return a type that implements an SQL provider method
7170
*
7271
* @see #value()
7372
*/
7473
Class<?> type() default void.class;
7574

76-
// @formatter:off
7775
/**
7876
* Specify a method for providing an SQL.
7977
* <p>
8078
* Since 3.5.1, this attribute can omit.
8179
* <p>
8280
* If this attribute omit, the MyBatis will call a method that decide by following rules.
8381
* <ul>
84-
* <li>
85-
* If class that specified the {@link #type()} attribute implements the
86-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
87-
* the MyBatis use a method that returned by it
88-
* </li>
89-
* <li>
90-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}(= not implement it or it was returned {@code null}),
91-
* the MyBatis will search and use a fallback method that named {@code provideSql} from specified type
92-
* </li>
82+
* <li>If class that specified the {@link #type()} attribute implements the
83+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it
84+
* </li>
85+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
86+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
87+
* <code>provideSql</code> from specified type</li>
9388
* </ul>
9489
*
9590
* @return a method name of method for providing an SQL
9691
*/
97-
// @formatter:on
9892
String method() default "";
9993

10094
/**

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -110,7 +110,6 @@ enum FlushCachePolicy {
110110
* Returns property names that holds a key value.
111111
* <p>
112112
* If you specify multiple property, please separate using comma(',').
113-
* </p>
114113
*
115114
* @return property names that separate with comma(',')
116115
*/
@@ -120,7 +119,6 @@ enum FlushCachePolicy {
120119
* Returns column names that retrieves a key value.
121120
* <p>
122121
* If you specify multiple column, please separate using comma(',').
123-
* </p>
124122
*
125123
* @return column names that separate with comma(',')
126124
*/
@@ -130,7 +128,6 @@ enum FlushCachePolicy {
130128
* Returns result set names.
131129
* <p>
132130
* If you specify multiple result set, please separate using comma(',').
133-
* </p>
134131
*
135132
* @return result set names that separate with comma(',')
136133
*/

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
* The annotation that specify an SQL for retrieving record(s).
2727
* <p>
2828
* <b>How to use:</b>
29-
* <p>
3029
* <ul>
3130
* <li>Simple:
3231
*

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -55,7 +55,6 @@
5555
* Returns property names that holds a key value.
5656
* <p>
5757
* If you specify multiple property, please separate using comma(',').
58-
* </p>
5958
*
6059
* @return property names that separate with comma(',')
6160
*/
@@ -65,7 +64,6 @@
6564
* Returns column names that retrieves a key value.
6665
* <p>
6766
* If you specify multiple column, please separate using comma(',').
68-
* </p>
6967
*
7068
* @return column names that separate with comma(',')
7169
*/

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

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -27,10 +27,10 @@
2727
* <p>
2828
* <b>How to use:</b>
2929
*
30-
* <pre>
30+
* <pre>{@code
3131
* public interface UserMapper {
3232
*
33-
* &#064;SelectProvider(type = SqlProvider.class, method = "selectById")
33+
* @SelectProvider(type = SqlProvider.class, method = "selectById")
3434
* User selectById(int id);
3535
*
3636
* public static class SqlProvider {
@@ -40,7 +40,7 @@
4040
* }
4141
*
4242
* }
43-
* </pre>
43+
* }</pre>
4444
*
4545
* @author Clinton Begin
4646
*/
@@ -72,31 +72,23 @@
7272
*/
7373
Class<?> type() default void.class;
7474

75-
// @formatter:off
7675
/**
7776
* Specify a method for providing an SQL.
7877
* <p>
7978
* Since 3.5.1, this attribute can omit.
8079
* <p>
8180
* If this attribute omit, the MyBatis will call a method that decide by following rules.
82-
*
8381
* <ul>
84-
* <li>
85-
* If class that specified the {@link #type()} attribute implements the
86-
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver},
87-
* the MyBatis use a method that returned by it.
88-
* </li>
89-
* <li>
90-
* If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}
91-
* (= not implement it or it was returned <code>null</code>,
92-
* the MyBatis will search and use a fallback method that named <code>provideSql</code> from
93-
* specified type.
94-
* </li>
82+
* <li>If class that specified the {@link #type()} attribute implements the
83+
* {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver}, the MyBatis use a method that returned by it.
84+
* </li>
85+
* <li>If cannot resolve a method by {@link org.apache.ibatis.builder.annotation.ProviderMethodResolver} (= not
86+
* implement it or it was returned <code>null</code>), the MyBatis will search and use a fallback method that named
87+
* <code>provideSql</code> from specified type.</li>
9588
* </ul>
9689
*
9790
* @return a method name of method for providing an SQL
9891
*/
99-
// @formatter:on
10092
String method() default "";
10193

10294
/**

0 commit comments

Comments
 (0)