GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java:新增支持 /reload 加参数 "value": { "id": 30 } 传过滤条件来增量热重载配置,解决腾讯 CSIG 某… · msgui/APIJSON-Demo@18ac4c2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • APIJSON-Java-Server
    • APIJSONBoot
      • libs
        • apijson-framework-4.5.0.jar
      • pom.xml
      • src/main/java/apijson/boot
        • DemoController.java
    • APIJSONFinal
      • libs
        • apijson-framework-4.5.0.jar
      • pom.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎…SONBoot/libs/apijson-framework-4.4.9.jar‎ ‎…SONBoot/libs/apijson-framework-4.5.0.jar‎APIJSON-Java-Server/APIJSONBoot/libs/apijson-framework-4.4.9.jar renamed to APIJSON-Java-Server/APIJSONBoot/libs/apijson-framework-4.5.0.jar APIJSON-Java-Server/APIJSONBoot/libs/apijson-framework-4.4.9.jar renamed to APIJSON-Java-Server/APIJSONBoot/libs/apijson-framework-4.5.0.jar

Copy file name to clipboard
63 KB
Binary file not shown.
Collapse file

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

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONBoot/pom.xml
+3-3Lines changed: 3 additions & 3 deletions
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.4.9</version>
8+
<version>4.5.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONBoot</name>
@@ -41,12 +41,12 @@
4141
<dependency>
4242
<groupId>com.github.Tencent</groupId>
4343
<artifactId>APIJSON</artifactId>
44-
<version>4.4.7</version>
44+
<version>4.4.8</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>com.github.APIJSON</groupId>
4848
<artifactId>apijson-framework</artifactId>
49-
<version>4.4.9</version>
49+
<version>4.5.0</version>
5050
</dependency>
5151
<!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 >>>>>>>>>> -->
5252

Collapse file

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

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONBoot/src/main/java/apijson/boot/DemoController.java
+10-4Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ public String openHead(@PathVariable String request, HttpSession session) {
257257
public static final String VERIFY = "verify";
258258

259259
public static final String TYPE = "type";
260+
public static final String VALUE = "value";
260261

261262

262263

@@ -268,7 +269,10 @@ public String openHead(@PathVariable String request, HttpSession session) {
268269
{
269270
"type": "ALL", //重载对象,ALL, FUNCTION, REQUEST, ACCESS,非必须
270271
"phone": "13000082001",
271-
"verify": "1234567" //验证码,对应类型为 Verify.TYPE_RELOAD
272+
"verify": "1234567", //验证码,对应类型为 Verify.TYPE_RELOAD
273+
"value": { // 自定义增量更新条件
274+
"id": 1 // 过滤条件,符合 APIJSON 查询功能符即可
275+
}
272276
}
273277
* </pre>
274278
*/
@@ -277,11 +281,13 @@ public String openHead(@PathVariable String request, HttpSession session) {
277281
public JSONObject reload(@RequestBody String request) {
278282
JSONObject requestObject = null;
279283
String type;
284+
JSONObject value;
280285
String phone;
281286
String verify;
282287
try {
283288
requestObject = DemoParser.parseRequest(request);
284289
type = requestObject.getString(TYPE);
290+
value = requestObject.getJSONObject(VALUE);
285291
phone = requestObject.getString(PHONE);
286292
verify = requestObject.getString(VERIFY);
287293
} catch (Exception e) {
@@ -300,7 +306,7 @@ public JSONObject reload(@RequestBody String request) {
300306

301307
if (reloadAll || "ACCESS".equals(type)) {
302308
try {
303-
result.put(ACCESS_, DemoVerifier.initAccess());
309+
result.put(ACCESS_, DemoVerifier.initAccess(false, null, value));
304310
} catch (ServerException e) {
305311
e.printStackTrace();
306312
result.put(ACCESS_, DemoParser.newErrorResult(e));
@@ -309,7 +315,7 @@ public JSONObject reload(@RequestBody String request) {
309315

310316
if (reloadAll || "FUNCTION".equals(type)) {
311317
try {
312-
result.put(FUNCTION_, DemoFunctionParser.init());
318+
result.put(FUNCTION_, DemoFunctionParser.init(false, null, value));
313319
} catch (ServerException e) {
314320
e.printStackTrace();
315321
result.put(FUNCTION_, DemoParser.newErrorResult(e));
@@ -318,7 +324,7 @@ public JSONObject reload(@RequestBody String request) {
318324

319325
if (reloadAll || "REQUEST".equals(type)) {
320326
try {
321-
result.put(REQUEST_, DemoVerifier.initRequest());
327+
result.put(REQUEST_, DemoVerifier.initRequest(false, null, value));
322328
} catch (ServerException e) {
323329
e.printStackTrace();
324330
result.put(REQUEST_, DemoParser.newErrorResult(e));
Collapse file

‎…ONFinal/libs/apijson-framework-4.4.9.jar‎ ‎…ONFinal/libs/apijson-framework-4.5.0.jar‎APIJSON-Java-Server/APIJSONFinal/libs/apijson-framework-4.4.9.jar renamed to APIJSON-Java-Server/APIJSONFinal/libs/apijson-framework-4.5.0.jar APIJSON-Java-Server/APIJSONFinal/libs/apijson-framework-4.4.9.jar renamed to APIJSON-Java-Server/APIJSONFinal/libs/apijson-framework-4.5.0.jar

Copy file name to clipboard
63 KB
Binary file not shown.
Collapse file

‎APIJSON-Java-Server/APIJSONFinal/pom.xml‎

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/pom.xml
+3-3Lines changed: 3 additions & 3 deletions
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>4.4.9</version>
7+
<version>4.5.0</version>
88
<name>Demo project for APIJSON Server based on JFinal</name>
99
<url>http://maven.apache.org</url>
1010
<dependencies>
@@ -24,12 +24,12 @@
2424
<dependency>
2525
<groupId>com.github.Tencent</groupId>
2626
<artifactId>APIJSON</artifactId>
27-
<version>4.4.7</version>
27+
<version>4.4.8</version>
2828
</dependency>
2929
<dependency>
3030
<groupId>com.github.APIJSON</groupId>
3131
<artifactId>apijson-framework</artifactId>
32-
<version>4.4.9</version>
32+
<version>4.5.0</version>
3333
</dependency>
3434
<!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 >>>>>>>>>> -->
3535

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.