diff --git a/CHANGELOG.md b/CHANGELOG.md
index edb31965..a092ba5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,7 +21,7 @@ This source code is licensed under Apache 2.0 License.
- [x] Duration
## Dependencies upgrade
-- [ ] Springboot 3.x support.
+- [x] Springboot 3.x support.
# NEXT
## Dependencies upgrade
@@ -82,6 +82,11 @@ This source code is licensed under Apache 2.0 License.
关系实体类示例。
diff --git a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/LikeWithRank.java b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/LikeWithRank.java index ef44125a..a287f2ca 100644 --- a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/LikeWithRank.java +++ b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/LikeWithRank.java @@ -4,8 +4,8 @@ // // This source code is licensed under Apache 2.0 License. -import javax.persistence.Id; -import javax.persistence.Table; +import jakarta.persistence.Id; +import jakarta.persistence.Table; /** *关系实体类示例。
diff --git a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/NoPropertiesVertex.java b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/NoPropertiesVertex.java index 74f9486a..4d661e9b 100644 --- a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/NoPropertiesVertex.java +++ b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/NoPropertiesVertex.java @@ -4,10 +4,11 @@ // // This source code is licensed under Apache 2.0 License. -import javax.persistence.Id; -import javax.persistence.Table; import org.nebula.contrib.ngbatis.annotations.Space; +import jakarta.persistence.Id; +import jakarta.persistence.Table; + /** * @author yeweicheng * @since 2023-08-02 18:35 diff --git a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/Person.java b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/Person.java index 1e2dd48e..30f05b2f 100644 --- a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/Person.java +++ b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/Person.java @@ -4,11 +4,12 @@ // // This source code is licensed under Apache 2.0 License. +import ye.weicheng.ngbatis.demo.annotations.ValueType; + +import jakarta.persistence.Id; +import jakarta.persistence.Table; import java.math.BigDecimal; import java.util.Date; -import javax.persistence.Id; -import javax.persistence.Table; -import ye.weicheng.ngbatis.demo.annotations.ValueType; /** *Person的实体类示例
diff --git a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/TimeTest.java b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/TimeTest.java index ce7159a2..6b33c2c2 100644 --- a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/TimeTest.java +++ b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/pojo/TimeTest.java @@ -4,13 +4,14 @@ // // This source code is licensed under Apache 2.0 License. +import jakarta.persistence.Column; +import jakarta.persistence.Id; +import jakarta.persistence.Table; + import java.sql.Time; import java.sql.Timestamp; import java.time.Duration; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Id; -import javax.persistence.Table; /** * @author yeweicheng diff --git a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/TestRepository.java b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/TestRepository.java index 8c3628c6..b641f036 100644 --- a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/TestRepository.java +++ b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/TestRepository.java @@ -5,10 +5,6 @@ // This source code is licensed under Apache 2.0 License. import com.vesoft.nebula.client.graph.data.ResultSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import javax.persistence.Id; import org.nebula.contrib.ngbatis.models.data.NgEdge; import org.nebula.contrib.ngbatis.models.data.NgSubgraph; import org.nebula.contrib.ngbatis.models.data.NgVertex; @@ -18,6 +14,11 @@ import ye.weicheng.ngbatis.demo.pojo.Person; import ye.weicheng.ngbatis.demo.pojo.PersonLikePerson; +import jakarta.persistence.Id; +import java.util.List; +import java.util.Map; +import java.util.Set; + /** * 数据访问层 样例。 * diff --git a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepository.java b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepository.java index d9c6533e..5062e325 100644 --- a/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepository.java +++ b/ngbatis-demo/src/main/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepository.java @@ -4,10 +4,11 @@ // // This source code is licensed under Apache 2.0 License. -import javax.annotation.Resource; import org.nebula.contrib.ngbatis.proxy.NebulaDaoBasic; import ye.weicheng.ngbatis.demo.pojo.Person; +import jakarta.annotation.Resource; + /** * 数据访问层 样例。 * diff --git a/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/EmployeeDaoTest.java b/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/EmployeeDaoTest.java index 43b7289e..befc2a50 100644 --- a/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/EmployeeDaoTest.java +++ b/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/EmployeeDaoTest.java @@ -5,11 +5,6 @@ // This source code is licensed under Apache 2.0 License. import com.alibaba.fastjson.JSON; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Date; -import java.util.List; -import java.util.Random; import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -19,6 +14,12 @@ import org.springframework.boot.test.context.SpringBootTest; import ye.weicheng.ngbatis.demo.pojo.Employee; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Random; + /** * Multi tags tests. * @author yeweicheng diff --git a/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepositoryTest.java b/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepositoryTest.java index 119312ac..4e2ec9b7 100644 --- a/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepositoryTest.java +++ b/ngbatis-demo/src/test/java/ye/weicheng/ngbatis/demo/repository/resource/TestRepositoryTest.java @@ -4,15 +4,16 @@ // // This source code is licensed under Apache 2.0 License. -import static org.springframework.util.Assert.isTrue; - -import java.util.Objects; -import javax.annotation.Resource; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import ye.weicheng.ngbatis.demo.repository.TestRepository; +import jakarta.annotation.Resource; +import java.util.Objects; + +import static org.springframework.util.Assert.isTrue; + /** * @author yeweicheng * @since 2023-08-04 17:48 diff --git a/pom.xml b/pom.xml index e51a77b8..55d18369 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@反射工具类。
* @@ -431,9 +430,9 @@ public static Class> typeArg(Object o, Class> parent, int i) { if (parent.isInterface()) { Type[] interfaces = insClass.getGenericInterfaces(); for (Type anInterface : interfaces) { - boolean isType = anInterface instanceof ParameterizedTypeImpl; + boolean isType = anInterface instanceof ParameterizedType; if (isType) { - ParameterizedTypeImpl paramTypeInterface = (ParameterizedTypeImpl) anInterface; + ParameterizedType paramTypeInterface = (ParameterizedType) anInterface; boolean found = paramTypeInterface.getRawType() == parent; if (found) { Type[] actualTypeArguments = paramTypeInterface.getActualTypeArguments(); @@ -455,8 +454,8 @@ public static Class> typeArg(Object o, Class> parent, int i) { * when type is not ParameterizedTypeImpl and the type name can not get class object in jvm. */ public static Class> typeToClass(Type type) throws ClassNotFoundException { - if (type instanceof ParameterizedTypeImpl) { - return ((ParameterizedTypeImpl) type).getRawType(); + if (type instanceof ParameterizedType) { + return ((ParameterizedType) type).getRawType().getClass(); } return Class.forName(type.getTypeName()); }