Skip to content

Commit 318f5ae

Browse files
committed
Java:所有 Demo 升级 APIJSON, apijson-framework, 自身版本为 4.8.3,升级 apijson-column, mysql-connector-java 分别至 1.1.5, 8.0.27;完善每个 Demo 类的说明并带上相关链接
1 parent 8484be9 commit 318f5ae

Some content is hidden

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

50 files changed

+607
-493
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ APIJSON-Java-Server/APIJSONDemo/.idea
1313
APIJSON-Java-Server/APIJSONDemo-HikariCP/.settings
1414
APIJSON-Java-Server/APIJSONBoot-MultiConnectionPool/.settings
1515
APIJSON-Java-Server/APIJSONBoot-MultiDataSource/.settings
16+
APIJSON-Java-Server/APIJSONBoot-MultiDataSource/.idea

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/pom.xml

+6-6
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>4.8.0</version>
8+
<version>4.8.3</version>
99
<!-- <packaging>jar</packaging> -->
1010

1111
<name>APIJSONBoot-MultiDataSource</name>
@@ -53,21 +53,21 @@
5353

5454

5555
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 <<<<<<<<<< -->
56-
<!-- <dependency>
56+
<dependency>
5757
<groupId>com.github.Tencent</groupId>
5858
<artifactId>APIJSON</artifactId>
59-
<version>4.8.0</version>
59+
<version>4.8.3</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>com.github.APIJSON</groupId>
6363
<artifactId>apijson-framework</artifactId>
64-
<version>4.8.0</version>
64+
<version>4.8.3</version>
6565
</dependency>
6666
<dependency>
6767
<groupId>com.github.APIJSON</groupId>
6868
<artifactId>apijson-column</artifactId>
69-
<version>1.1.3</version>
70-
</dependency> -->
69+
<version>1.1.5</version>
70+
</dependency>
7171
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
7272

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

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoApplication.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@
6161
import unitauto.jar.UnitAutoApp;
6262

6363

64-
/**SpringBootApplication
65-
* 右键这个类 > Run As > Java Application
64+
/**Demo SpringBoot Application 主应用程序启动类
65+
* 右键这个类 > Run As > Java Application
66+
* 具体见 SpringBoot 文档
67+
* https://www.springcloud.cc/spring-boot.html#using-boot-locating-the-main-class
6668
* @author Lemon
6769
*/
6870
@Configuration

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/boot/DemoController.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@
8787
import apijson.orm.exception.OutOfRangeException;
8888

8989

90-
/**数据相关的控制器,包括通用增删改查接口等
90+
/**请求路由入口控制器,包括通用增删改查接口等,转交给 APIJSON 的 Parser 来处理
91+
* 具体见 SpringBoot 文档
92+
* https://www.springcloud.cc/spring-boot.html#boot-features-spring-mvc
93+
* 以及 APIJSON 通用文档 3.设计规范 3.1 操作方法
94+
* https://github.com/Tencent/APIJSON/blob/master/Document.md#3.1
9195
* <br > 建议全通过HTTP POST来请求:
9296
* <br > 1.减少代码 - 客户端无需写HTTP GET,PUT等各种方式的请求代码
9397
* <br > 2.提高性能 - 无需URL encode和decode

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoFunctionParser.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
import apijson.orm.JSONRequest;
3333

3434

35-
/**可远程调用的函数类
35+
/**可远程调用的函数类,用于自定义业务逻辑处理
36+
* 具体见 https://github.com/Tencent/APIJSON/issues/101
3637
* @author Lemon
3738
*/
3839
public class DemoFunctionParser extends APIJSONFunctionParser {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoObjectParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import apijson.orm.SQLConfig;
2828

2929

30-
/**简化Parser,getObject和getArray(getArrayConfig)都能用
30+
/**对象解析器,用来简化 Parser
3131
* @author Lemon
3232
*/
3333
public class DemoObjectParser extends APIJSONObjectParser {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoParser.java

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424

2525
/**请求解析器
26+
* 具体见 https://github.com/Tencent/APIJSON/issues/38
2627
* @author Lemon
2728
*/
2829
public class DemoParser extends APIJSONParser {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLConfig.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
import apijson.orm.AbstractSQLConfig;
3434

3535

36-
/**SQL 配置
36+
/**SQL配置
3737
* TiDB 用法和 MySQL 一致
38+
* 具体见详细的说明文档 C.开发说明 C-1-1.修改数据库链接
39+
* https://github.com/Tencent/APIJSON/blob/master/%E8%AF%A6%E7%BB%86%E7%9A%84%E8%AF%B4%E6%98%8E%E6%96%87%E6%A1%A3.md#c-1-1%E4%BF%AE%E6%94%B9%E6%95%B0%E6%8D%AE%E5%BA%93%E9%93%BE%E6%8E%A5
3840
* @author Lemon
3941
*/
4042
public class DemoSQLConfig extends APIJSONSQLConfig {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoSQLExecutor.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
import apijson.orm.SQLConfig;
2929

3030

31-
/**SQL 执行
31+
/**SQL 执行器,支持连接池及多数据源
32+
* 具体见 https://github.com/Tencent/APIJSON/issues/151
3233
* @author Lemon
3334
*/
3435
public class DemoSQLExecutor extends APIJSONSQLExecutor {

APIJSON-Java-Server/APIJSONBoot-MultiDataSource/src/main/java/apijson/demo/DemoVerifier.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
import apijson.framework.APIJSONVerifier;
1818

1919

20-
/**权限验证器
20+
/**安全校验器,校验请求参数、角色与权限等
21+
* 具体见 https://github.com/Tencent/APIJSON/issues/12
2122
* @author Lemon
2223
*/
2324
public class DemoVerifier extends APIJSONVerifier {
Binary file not shown.
Binary file not shown.
Binary file not shown.

APIJSON-Java-Server/APIJSONBoot/pom.xml

+6-6
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>4.8.0</version>
8+
<version>4.8.3</version>
99
<!-- <packaging>jar</packaging> -->
1010

1111
<name>APIJSONBoot</name>
@@ -34,7 +34,7 @@
3434

3535
<!-- 单元测试:可使用 libs 目录的 unitauto-java.jar 和 unitauto-jar.jar 来替代,两种方式二选一
3636
<<<<<<<<< -->
37-
<dependency>
37+
<dependency>
3838
<groupId>com.github.TommyLemon</groupId>
3939
<artifactId>unitauto-java</artifactId>
4040
<version>2.6.3</version>
@@ -56,25 +56,25 @@
5656
<dependency>
5757
<groupId>com.github.Tencent</groupId>
5858
<artifactId>APIJSON</artifactId>
59-
<version>4.8.0</version>
59+
<version>4.8.3</version>
6060
</dependency>
6161
<dependency>
6262
<groupId>com.github.APIJSON</groupId>
6363
<artifactId>apijson-framework</artifactId>
64-
<version>4.8.0</version>
64+
<version>4.8.3</version>
6565
</dependency>
6666
<dependency>
6767
<groupId>com.github.APIJSON</groupId>
6868
<artifactId>apijson-column</artifactId>
69-
<version>1.1.3</version>
69+
<version>1.1.5</version>
7070
</dependency>
7171
<!-- 可使用 libs 目录的 apijson-orm.jar, apijson-framework.jar, apijson-column.jar 来替代,两种方式二选一 >>>>>>>>>> -->
7272

7373
<!-- 需要用的数据库 JDBC 驱动 -->
7474
<dependency>
7575
<groupId>mysql</groupId>
7676
<artifactId>mysql-connector-java</artifactId>
77-
<version>8.0.22</version>
77+
<version>8.0.27</version>
7878
</dependency>
7979
<dependency>
8080
<groupId>org.postgresql</groupId>

APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/boot/DemoApplication.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@
6161
import unitauto.jar.UnitAutoApp;
6262

6363

64-
/**SpringBootApplication
65-
* 右键这个类 > Run As > Java Application
64+
/**Demo SpringBoot Application 主应用程序启动类
65+
* 右键这个类 > Run As > Java Application
66+
* 具体见 SpringBoot 文档
67+
* https://www.springcloud.cc/spring-boot.html#using-boot-locating-the-main-class
6668
* @author Lemon
6769
*/
6870
@Configuration

0 commit comments

Comments
 (0)