Skip to content

Commit 9aa1b39

Browse files
committed
Java:所有 Demo 升级 APIJSON 5.4.0, apijson-framework-5.4.0, apijson-column-1.2.9
1 parent 58d08e5 commit 9aa1b39

File tree

32 files changed

+58
-116
lines changed

32 files changed

+58
-116
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

Diff for: APIJSON-Java-Server/APIJSONBoot-BigData/pom.xml

+2-8
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,12 @@
6767
<dependency>
6868
<groupId>com.github.APIJSON</groupId>
6969
<artifactId>apijson-framework</artifactId>
70-
<version>5.3.0</version>
71-
<exclusions>
72-
<exclusion>
73-
<groupId>com.github.Tecent</groupId>
74-
<artifactId>APIJSON</artifactId>
75-
</exclusion>
76-
</exclusions>
70+
<version>5.4.0</version>
7771
</dependency>
7872
<dependency>
7973
<groupId>com.github.APIJSON</groupId>
8074
<artifactId>apijson-column</artifactId>
81-
<version>1.2.7</version>
75+
<version>1.2.9</version>
8276
</dependency>
8377
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
8478

Diff for: APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml

-6
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@
7878
<groupId>com.github.APIJSON</groupId>
7979
<artifactId>apijson-router</artifactId>
8080
<version>1.1.0</version>
81-
<exclusions>
82-
<exclusion>
83-
<groupId>com.github.Tencent</groupId>
84-
<artifactId>APIJSON</artifactId>
85-
</exclusion>
86-
</exclusions>
8781
</dependency>
8882
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
8983

-202 KB
Binary file not shown.
205 KB
Binary file not shown.
-40.7 KB
Binary file not shown.
Binary file not shown.

Diff for: APIJSON-Java-Server/APIJSONBoot/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.boot</groupId>
77
<artifactId>apijson-boot</artifactId>
8-
<version>5.3.0</version>
8+
<version>5.4.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONBoot</name>
@@ -62,17 +62,17 @@
6262
<dependency>
6363
<groupId>com.github.Tencent</groupId>
6464
<artifactId>APIJSON</artifactId>
65-
<version>5.3.0</version>
65+
<version>5.4.0</version>
6666
</dependency>
6767
<dependency>
6868
<groupId>com.github.APIJSON</groupId>
6969
<artifactId>apijson-framework</artifactId>
70-
<version>5.3.0</version>
70+
<version>5.4.0</version>
7171
</dependency>
7272
<dependency>
7373
<groupId>com.github.APIJSON</groupId>
7474
<artifactId>apijson-column</artifactId>
75-
<version>1.2.7</version>
75+
<version>1.2.9</version>
7676
</dependency>
7777
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
7878

Diff for: APIJSON-Java-Server/APIJSONDemo-ClickHouse/pom.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@
3333
<dependency>
3434
<groupId>com.github.APIJSON</groupId>
3535
<artifactId>apijson-framework</artifactId>
36-
<version>5.3.0</version>
37-
<exclusions>
38-
<exclusion>
39-
<groupId>com.github.Tecent</groupId>
40-
<artifactId>APIJSON</artifactId>
41-
</exclusion>
42-
</exclusions>
36+
<version>5.4.0</version>
4337
</dependency>
4438

4539
<!-- 需要用的数据库 JDBC 驱动 -->

Diff for: APIJSON-Java-Server/APIJSONDemo-ClickHouse/src/main/java/apijson/demo/DemoSQLConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class DemoSQLConfig extends APIJSONSQLConfig {
2929

3030
static {
31-
DEFAULT_DATABASE = DATABASE_PRESTO; // TODO 默认数据库类型,改成你自己的
31+
DEFAULT_DATABASE = DATABASE_CLICKHOUSE; // TODO 默认数据库类型,改成你自己的
3232
DEFAULT_SCHEMA = "sys"; // TODO 默认数据库名/模式,改成你自己的,默认情况是 MySQL: sys, PostgreSQL: public, SQL Server: dbo, Oracle:
3333

3434
// 表名和数据库不一致的,需要配置映射关系。只使用 APIJSONORM 时才需要;

Diff for: APIJSON-Java-Server/APIJSONDemo-Druid/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.demo</groupId>
77
<artifactId>apijson-demo-druid</artifactId>
8-
<version>5.3.0</version>
8+
<version>5.4.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONDemo-Druid</name>
@@ -29,7 +29,7 @@
2929
<dependency>
3030
<groupId>com.github.APIJSON</groupId>
3131
<artifactId>apijson-framework</artifactId>
32-
<version>5.3.0</version>
32+
<version>5.4.0</version>
3333
</dependency>
3434

3535
<!-- 需要用的数据库 JDBC 驱动 -->

Diff for: APIJSON-Java-Server/APIJSONDemo-Elasticsearch/pom.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@
3333
<dependency>
3434
<groupId>com.github.APIJSON</groupId>
3535
<artifactId>apijson-framework</artifactId>
36-
<version>5.3.0</version>
37-
<exclusions>
38-
<exclusion>
39-
<groupId>com.github.Tecent</groupId>
40-
<artifactId>APIJSON</artifactId>
41-
</exclusion>
42-
</exclusions>
36+
<version>5.4.0</version>
4337
</dependency>
4438

4539
<!-- 需要用的数据库 JDBC 驱动 -->
Binary file not shown.

Diff for: APIJSON-Java-Server/APIJSONDemo-Hadoop/pom.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@
3333
<dependency>
3434
<groupId>com.github.APIJSON</groupId>
3535
<artifactId>apijson-framework</artifactId>
36-
<version>5.3.0</version>
37-
<exclusions>
38-
<exclusion>
39-
<groupId>com.github.Tecent</groupId>
40-
<artifactId>APIJSON</artifactId>
41-
</exclusion>
42-
</exclusions>
36+
<version>5.4.0</version>
4337
</dependency>
4438

4539
<!-- 需要用的数据库 JDBC 驱动 -->

Diff for: APIJSON-Java-Server/APIJSONDemo-HikariCP/pom.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.demo</groupId>
77
<artifactId>apijson-demo-hikaricp</artifactId>
8-
<version>5.3.0</version>
8+
<version>5.4.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONDemo</name>
@@ -18,18 +18,18 @@
1818
</properties>
1919

2020
<dependencies>
21-
<!-- JDK 11+ 需要,否则启动报错 NoClassDefFoundError: javax/activation/UnsupportedDataTypeException -->
22-
<dependency>
23-
<groupId>javax.activation</groupId>
24-
<artifactId>activation</artifactId>
25-
<version>1.1.1</version>
26-
</dependency>
21+
<!-- JDK 11+ 需要,否则启动报错 NoClassDefFoundError: javax/activation/UnsupportedDataTypeException -->
22+
<dependency>
23+
<groupId>javax.activation</groupId>
24+
<artifactId>activation</artifactId>
25+
<version>1.1.1</version>
26+
</dependency>
2727

2828
<!-- 需要的 APIJSON 相关依赖 -->
2929
<dependency>
3030
<groupId>com.github.APIJSON</groupId>
3131
<artifactId>apijson-framework</artifactId>
32-
<version>5.3.0</version>
32+
<version>5.4.0</version>
3333
</dependency>
3434

3535
<!-- 需要用的数据库 JDBC 驱动 -->

Diff for: APIJSON-Java-Server/APIJSONDemo-Presto/pom.xml

+1-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@
3333
<dependency>
3434
<groupId>com.github.APIJSON</groupId>
3535
<artifactId>apijson-framework</artifactId>
36-
<version>5.3.0</version>
37-
<exclusions>
38-
<exclusion>
39-
<groupId>com.github.Tecent</groupId>
40-
<artifactId>APIJSON</artifactId>
41-
</exclusion>
42-
</exclusions>
36+
<version>5.4.0</version>
4337
</dependency>
4438

4539
<!-- 需要用的数据库 JDBC 驱动 -->

Diff for: APIJSON-Java-Server/APIJSONDemo-ShardingSphere/pom.xml

+2-14
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,12 @@
2828
<dependency>
2929
<groupId>com.github.Tencent</groupId>
3030
<artifactId>APIJSON</artifactId>
31-
<version>5.3.0</version>
31+
<version>5.4.0</version>
3232
</dependency>
3333
<dependency>
3434
<groupId>com.github.APIJSON</groupId>
3535
<artifactId>apijson-framework</artifactId>
36-
<version>5.3.0</version>
37-
<exclusions>
38-
<exclusion>
39-
<groupId>com.github.Tecent</groupId>
40-
<artifactId>APIJSON</artifactId>
41-
</exclusion>
42-
</exclusions>
36+
<version>5.4.0</version>
4337
</dependency>
4438

4539
<!-- 需要用的数据库 JDBC 驱动 -->
@@ -49,12 +43,6 @@
4943
<version>8.0.29</version>
5044
</dependency>
5145

52-
<dependency>
53-
<groupId>org.xerial</groupId>
54-
<artifactId>sqlite-jdbc</artifactId>
55-
<version>3.39.3.0</version>
56-
</dependency>
57-
5846
<!-- 需要用的 HikariCp 数据库连接池库,3.1.0 以上 -->
5947
<dependency>
6048
<groupId>com.zaxxer</groupId>

Diff for: APIJSON-Java-Server/APIJSONDemo-ShardingSphere/src/main/java/apijson/demo/DemoApplication.java

-10
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,6 @@ public SQLExecutor createSQLExecutor() {
9696
}
9797
};
9898

99-
try { //加载驱动程序
100-
Log.d(TAG, "尝试加载 SQLite 驱动 <<<<<<<<<<<<<<<<<<<<< ");
101-
Class.forName("org.sqlite.SQLiteJDBCLoader");
102-
Log.d(TAG, "成功加载 SQLite 驱动!>>>>>>>>>>>>>>>>>>>>> ");
103-
}
104-
catch (ClassNotFoundException e) {
105-
e.printStackTrace();
106-
Log.e(TAG, "加载 SQLite 驱动失败,请检查 pom.xml 中 sqlite-jdbc 版本是否存在以及可用 !!!");
107-
}
108-
10999
try { //加载驱动程序
110100
Log.d(TAG, "尝试加载 ShardingSphere 驱动 <<<<<<<<<<<<<<<<<<<<< ");
111101
Class.forName("org.apache.shardingsphere.driver.ShardingSphereDriver");

Diff for: APIJSON-Java-Server/APIJSONDemo-ShardingSphere/src/main/java/apijson/demo/DemoSQLConfig.java

+30-30
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,42 @@
2727
*/
2828
public class DemoSQLConfig extends APIJSONSQLConfig {
2929

30-
static {
31-
DEFAULT_DATABASE = DATABASE_MYSQL; // TODO 默认数据库类型,改成你自己的
32-
DEFAULT_SCHEMA = "sys"; // TODO 默认数据库名/模式,改成你自己的,默认情况是 MySQL: sys, PostgreSQL: public, SQL Server: dbo, Oracle:
30+
static {
31+
DEFAULT_DATABASE = DATABASE_MYSQL; // TODO 默认数据库类型,改成你自己的
32+
DEFAULT_SCHEMA = "sys"; // TODO 默认数据库名/模式,改成你自己的,默认情况是 MySQL: sys, PostgreSQL: public, SQL Server: dbo, Oracle:
3333

3434
// 表名和数据库不一致的,需要配置映射关系。只使用 APIJSONORM 时才需要;
3535
// 如果用了 apijson-framework 且调用了 APIJSONApplication.init 则不需要
3636
// (间接调用 DemoVerifier.init 方法读取数据库 Access 表来替代手动输入配置)。
3737
// 但如果 Access 这张表的对外表名与数据库实际表名不一致,仍然需要这里注册。例如
3838
// TABLE_KEY_MAP.put(Access.class.getSimpleName(), "access");
3939

40-
//表名映射,隐藏真实表名,对安全要求很高的表可以这么做
41-
TABLE_KEY_MAP.put("User", "apijson_user");
42-
TABLE_KEY_MAP.put("Privacy", "apijson_privacy");
43-
}
44-
45-
@Override
46-
public String getDBVersion() {
47-
return "8.0.11"; // TODO 改成你自己的 MySQL 或 PostgreSQL 数据库版本号 // MYSQL 8 和 7 使用的 JDBC 配置不一样
48-
}
49-
50-
@JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息
51-
@Override
52-
public String getDBUri() {
53-
return "jdbc:sqlite:sample.db"; // TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000
54-
}
55-
56-
@JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息
57-
@Override
58-
public String getDBAccount() {
59-
return "root"; // TODO 改成你自己的
60-
}
61-
62-
@JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息
63-
@Override
64-
public String getDBPassword() {
65-
return "apijson"; // TODO 改成你自己的,TiDB 可以当成 MySQL 使用, 默认密码为空字符串 ""
66-
}
40+
//表名映射,隐藏真实表名,对安全要求很高的表可以这么做
41+
TABLE_KEY_MAP.put("User", "apijson_user");
42+
TABLE_KEY_MAP.put("Privacy", "apijson_privacy");
43+
}
44+
45+
@Override
46+
public String getDBVersion() {
47+
return "5.7.22"; // "8.0.11"; // TODO 改成你自己的 MySQL 或 PostgreSQL 数据库版本号 // MYSQL 8 和 7 使用的 JDBC 配置不一样
48+
}
49+
50+
@JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息
51+
@Override
52+
public String getDBUri() {
53+
return "jdbc:mysql://localhost:3306?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8"; // TODO 改成你自己的,TiDB 可以当成 MySQL 使用,默认端口为 4000
54+
}
55+
56+
@JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息
57+
@Override
58+
public String getDBAccount() {
59+
return "root"; // TODO 改成你自己的
60+
}
61+
62+
@JSONField(serialize = false) // 不在日志打印 账号/密码 等敏感信息
63+
@Override
64+
public String getDBPassword() {
65+
return "apijson"; // TODO 改成你自己的,TiDB 可以当成 MySQL 使用, 默认密码为空字符串 ""
66+
}
6767

6868
}

Diff for: APIJSON-Java-Server/APIJSONDemo/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>apijson.demo</groupId>
77
<artifactId>apijson-demo</artifactId>
8-
<version>5.3.0</version>
8+
<version>5.4.0</version>
99

1010
<name>APIJSONDemo</name>
1111
<description>Demo project for Testing APIJSON Server based on SpringBoot</description>
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>com.github.APIJSON</groupId>
3030
<artifactId>apijson-framework</artifactId>
31-
<version>5.3.0</version>
31+
<version>5.4.0</version>
3232
</dependency>
3333

3434
<!-- 需要用的数据库 JDBC 驱动 -->
-198 KB
Binary file not shown.
205 KB
Binary file not shown.
-5.38 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
95.7 KB
Binary file not shown.
5.1 KB
Binary file not shown.

Diff for: APIJSON-Java-Server/APIJSONFinal/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>apijson.jfinal</groupId>
55
<artifactId>apijson-final</artifactId>
66
<packaging>jar</packaging>
7-
<version>5.3.0</version>
7+
<version>5.4.0</version>
88
<name>Demo project for APIJSON Server based on JFinal</name>
99
<url>http://maven.apache.org</url>
1010
<dependencies>
@@ -33,12 +33,12 @@
3333
<dependency>
3434
<groupId>com.github.Tencent</groupId>
3535
<artifactId>APIJSON</artifactId>
36-
<version>5.3.0</version>
36+
<version>5.4.0</version>
3737
</dependency>
3838
<dependency>
3939
<groupId>com.github.APIJSON</groupId>
4040
<artifactId>apijson-framework</artifactId>
41-
<version>5.3.0</version>
41+
<version>5.4.0</version>
4242
</dependency>
4343
<!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 >>>>>>>>>> -->
4444

0 commit comments

Comments
 (0)