Skip to content

Commit df9ca57

Browse files
committed
升级 APIJSON 8 和 MySQL-JDBC 9.2,移除 fastjson,整合 apijson-column,暂时移除 UnitAuto
1 parent 6cfc35a commit df9ca57

23 files changed

+1882
-1342
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ https://github.com/APIJSON/APIJSON-Demo/blob/master/APIJSON-Java-Server/APIJSOND
7474

7575
## 初始化
7676
## Initialization
77-
#### 1.在你项目的主程序启动类 Application 的 static {} 代码块配置 APIJSONApplication.DEFAULT_APIJSON_CREATOR,至少重写 createSQLConfig 方法返回你自己继承 APIJSONSQLConfig 的子类
78-
#### 1.Configure APIJSONApplication.DEFAULT_APIJSON_CREATOR in static {} of your Application, at least override createSQLConfig method and return your SQLConfig extends APIJSONSQLConfig.
77+
#### 1.在你项目的主程序启动类 Application 的 static {} 代码块配置 APIJSONApplication.DEFAULT_APIJSON_CREATOR,至少重写 createSQLConfig<T, M, L> 方法返回你自己继承 APIJSONSQLConfig<T, M, L> 的子类
78+
#### 1.Configure APIJSONApplication.DEFAULT_APIJSON_CREATOR in static {} of your Application, at least override createSQLConfig<T, M, L> method and return your APIJSONSQLConfig<T, M, L> extends APIJSONSQLConfig.
7979

8080
```java
8181
static {
82-
APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator<Long>() {
82+
APIJSONApplication.DEFAULT_APIJSON_CREATOR = new APIJSONCreator<Long, JSONObject, JSONArray>() {
8383
@Override
84-
public SQLConfig createSQLConfig() {
84+
public DemoSQLConfig createSQLConfig() {
8585
return new DemoSQLConfig();
8686
}
8787
};

pom.xml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.framework</groupId>
77
<artifactId>apijson-framework</artifactId>
8-
<version>7.1.7</version>
8+
<version>7.2.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONFramework</name>
@@ -35,29 +35,18 @@
3535
<scope>provided</scope>
3636
</dependency>
3737

38-
<dependency>
39-
<groupId>com.alibaba</groupId>
40-
<artifactId>fastjson</artifactId>
41-
<version>1.2.83</version>
42-
</dependency>
43-
4438
<!-- 可使用 libs 目录的 apijson-orm.jar 来替代,两种方式二选一 -->
4539
<dependency>
4640
<groupId>com.github.Tencent</groupId>
4741
<artifactId>APIJSON</artifactId>
48-
<version>7.5.5</version>
49-
</dependency>
50-
<dependency>
51-
<groupId>com.github.APIJSON</groupId>
52-
<artifactId>apijson-column</artifactId>
53-
<version>2.1.5</version>
42+
<version>8.0.0.0</version>
5443
</dependency>
5544

5645
<!-- 数据库 JDBC 驱动 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
5746
<dependency>
5847
<groupId>com.mysql</groupId>
5948
<artifactId>mysql-connector-j</artifactId>
60-
<version>8.4.0</version>
49+
<version>9.2.0</version>
6150
</dependency>
6251
<dependency>
6352
<groupId>org.postgresql</groupId>
@@ -66,20 +55,6 @@
6655
</dependency>
6756
<!-- 数据库 JDBC 驱动 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -->
6857

69-
70-
<!-- 单元测试:可使用 libs 目录的 unitauto-java.jar 和 unitauto-jar.jar 来替代,两种方式二选一 <<<<<<<<< -->
71-
<dependency>
72-
<groupId>com.github.TommyLemon</groupId>
73-
<artifactId>unitauto-java</artifactId>
74-
<version>3.0.5</version>
75-
</dependency>
76-
<dependency>
77-
<groupId>com.github.TommyLemon</groupId>
78-
<artifactId>unitauto-jar</artifactId>
79-
<version>3.0.5</version>
80-
</dependency>
81-
<!-- 单元测试:可使用 libs 目录的 unitauto-java.jar 和 unitauto-jar.jar 来替代,两种方式二选一 >>>>>>>>> -->
82-
8358
</dependencies>
8459

8560
<build>

src/main/java/apijson/framework/APIJSONApplication.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
package apijson.framework;
1616

1717
import java.rmi.ServerException;
18+
import java.util.List;
19+
import java.util.Map;
1820

1921
import apijson.Log;
2022
import apijson.NotNull;
@@ -30,7 +32,7 @@ public class APIJSONApplication {
3032
public static final String TAG = "APIJSONApplication";
3133

3234
@NotNull
33-
public static APIJSONCreator<? extends Object> DEFAULT_APIJSON_CREATOR;
35+
public static APIJSONCreator<?, ? extends Map<String, Object>, ? extends List<Object>> DEFAULT_APIJSON_CREATOR;
3436
static {
3537
DEFAULT_APIJSON_CREATOR = new APIJSONCreator<>();
3638
}
@@ -56,7 +58,8 @@ public static void init(boolean shutdownWhenServerError) throws Exception {
5658
* @return
5759
* @throws Exception
5860
*/
59-
public static <T extends Object> void init(@NotNull APIJSONCreator<T> creator) throws Exception {
61+
public static <T, M extends Map<String, Object>, L extends List<Object>> void init(
62+
@NotNull APIJSONCreator<T, M, L> creator) throws Exception {
6063
init(true, creator);
6164
}
6265
/**初始化,加载所有配置并校验
@@ -65,7 +68,8 @@ public static <T extends Object> void init(@NotNull APIJSONCreator<T> creator) t
6568
* @return
6669
* @throws Exception
6770
*/
68-
public static <T extends Object> void init(boolean shutdownWhenServerError, @NotNull APIJSONCreator<T> creator) throws Exception {
71+
public static <T, M extends Map<String, Object>, L extends List<Object>> void init(
72+
boolean shutdownWhenServerError, @NotNull APIJSONCreator<T, M, L> creator) throws Exception {
6973
System.out.println("\n\n\n\n\n<<<<<<<<<<<<<<<<<<<<<<<<< APIJSON 开始启动 >>>>>>>>>>>>>>>>>>>>>>>>\n");
7074
DEFAULT_APIJSON_CREATOR = creator;
7175

0 commit comments

Comments
 (0)