Skip to content

Commit 45d7a32

Browse files
committed
Java:升级 apijson-framework 依赖为 4.3.1,非 DEBUG 模式下不允许使用 UnitAuto 单元测试
1 parent a0ee652 commit 45d7a32

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

APIJSON-Java-Server/APIJSONBoot/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@
7373
<!-- 没找到合适且稳定的 Oracle 的 JDBC Maven 依赖,需要自行下载 jar 包 -->
7474

7575
<!-- 可使用 libs 目录的 apijson-framework.jar 和 apijson-orm.jar 本地 jar 包依赖来替代,两种方式二选一 -->
76-
<!-- <dependency>
76+
<!-- <dependency>
7777
<groupId>com.github.APIJSON</groupId>
7878
<artifactId>apijson-framework</artifactId>
79-
<version>4.3.0</version>
79+
<version>4.3.1</version>
8080
</dependency> -->
8181

8282
</dependencies>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ public void customize(ConfigurableEmbeddedServletContainer container) {
229229
}
230230

231231

232-
//支持JavaScript跨域请求<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
232+
// 支持 APIAuto 中 JavaScript 代码跨域请求 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
233+
233234
/**
234235
* 跨域过滤器
235236
* @return
@@ -251,6 +252,7 @@ private CorsConfiguration buildConfig() {
251252
corsConfiguration.setAllowCredentials(true); //允许发送跨域凭据,前端Axios存取JSESSIONID必须要
252253
return corsConfiguration;
253254
}
254-
//支持JavaScript跨域请求 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
255+
256+
// 支持 APIAuto 中 JavaScript 代码跨域请求 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
255257

256258
}

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,9 @@ public JSONObject putBalance(@RequestBody String request, HttpSession session) {
974974
return new DemoParser(PUT).setSession(session).parseResponse(requestObject);
975975
}
976976

977+
978+
979+
// 为 APIAuto 提供的代理接口(解决跨域问题) 和 导入第三方文档的测试接口 https://github.com/TommyLemon/APIAuto <<<<<<<<<<<<<<<<<<<<<<<<<<<
977980

978981
public static final String ADD_COOKIE = "Add-Cookie";
979982
public static final List<String> EXCEPT_HEADER_LIST;
@@ -1539,9 +1542,11 @@ public String rapRepositoryDetail(@RequestParam("id") String id) {
15391542
"}";
15401543
}
15411544

1542-
1545+
// 为 APIAuto 提供的代理接口(解决跨域问题) 和 导入第三方文档的测试接口 https://github.com/TommyLemon/APIAuto https://github.com/TommyLemon/APIAuto >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1546+
15431547

15441548

1549+
// 为 UnitAuto 提供的单元测试接口 https://github.com/TommyLemon/UnitAuto <<<<<<<<<<<<<<<<<<<<<<<<<<<
15451550

15461551
@PostMapping("method/list")
15471552
public JSONObject listMethod(@RequestBody String request) {
@@ -1553,6 +1558,7 @@ public void invokeMethod(@RequestBody String request, HttpServletRequest servlet
15531558
super.invokeMethod(request, servletRequest);
15541559
}
15551560

1561+
// 为 UnitAuto 提供的单元测试接口 https://github.com/TommyLemon/UnitAuto >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
15561562

15571563

15581564
}

0 commit comments

Comments
 (0)