Skip to content

Commit 81a2846

Browse files
committed
Java:APIJSONDemo-SpringBoot3 升级 JDK 17,APIJSON 7.1.0, apijson-framework 及自身 7.1.5
1 parent 00adec8 commit 81a2846

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

APIJSON-Java-Server/APIJSONDemo-SpringBoot3/pom.xml

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.0.6</version>
8+
<version>3.2.5</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>apijson.demo</groupId>
1212
<artifactId>apijson-demo</artifactId>
1313
<name>apijson-demo</name>
1414
<description>Demo project for Spring Boot</description>
15-
<version>7.0.3</version>
15+
<version>7.1.0</version>
1616
<properties>
1717
<java.version>17</java.version>
1818
</properties>
@@ -28,7 +28,7 @@
2828
<dependency>
2929
<groupId>com.github.Tencent</groupId>
3030
<artifactId>APIJSON</artifactId>
31-
<version>7.0.3</version>
31+
<version>7.1.0</version>
3232
</dependency>
3333

3434
<!-- 数据库 JDBC 驱动 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -->
@@ -42,11 +42,13 @@
4242
<dependency>
4343
<groupId>org.springframework.boot</groupId>
4444
<artifactId>spring-boot-starter-web</artifactId>
45+
<version>3.2.5</version>
4546
</dependency>
4647

4748
<dependency>
4849
<groupId>org.springframework.boot</groupId>
4950
<artifactId>spring-boot-starter-test</artifactId>
51+
<version>3.2.5</version>
5052
<scope>test</scope>
5153
</dependency>
5254
</dependencies>
@@ -56,6 +58,7 @@
5658
<plugin>
5759
<groupId>org.springframework.boot</groupId>
5860
<artifactId>spring-boot-maven-plugin</artifactId>
61+
<version>3.2.5</version>
5962
</plugin>
6063
</plugins>
6164
</build>

APIJSON-Java-Server/APIJSONDemo-SpringBoot3/src/main/java/apijson/demo/DemoApplication.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void customize(ConfigurableServletWebServerFactory server) {
5757

5858
// 支持 APIAuto 中 JavaScript 代码跨域请求
5959
@Bean
60-
public WebMvcConfigurer corsConfigurer() {
60+
public WebMvcConfigurer corsConfig() {
6161
return new WebMvcConfigurer() {
6262
@Override
6363
public void addCorsMappings(CorsRegistry registry) {

APIJSON-Java-Server/APIJSONDemo-SpringBoot3/src/main/java/apijson/demo/DemoFunctionParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* 具体见 https://github.com/Tencent/APIJSON/issues/101
2525
* @author Lemon
2626
*/
27-
public class DemoFunctionParser extends AbstractFunctionParser {
27+
public class DemoFunctionParser extends AbstractFunctionParser<Long> {
2828
public static final String TAG = "DemoFunctionParser";
2929

3030

APIJSON-Java-Server/APIJSONDemo-SpringBoot3/src/main/java/apijson/demo/DemoObjectParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
/**对象解析器,用来简化 Parser
3131
* @author Lemon
3232
*/
33-
public class DemoObjectParser extends AbstractObjectParser {
33+
public class DemoObjectParser extends AbstractObjectParser<Long> {
3434

3535
public DemoObjectParser(HttpSession session, @NotNull JSONObject request, String parentPath, SQLConfig arrayConfig
3636
, boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception {

APIJSON-Java-Server/APIJSONDemo-SpringBoot3/src/main/java/apijson/demo/DemoParser.java

+9-7
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,24 @@ public Parser<Long> createParser() {
8585
}
8686

8787
@Override
88-
public ObjectParser createObjectParser(JSONObject request, String parentPath, SQLConfig arrayConfig
88+
public ObjectParser<Long> createObjectParser(JSONObject request, String parentPath, SQLConfig<Long> arrayConfig
8989
, boolean isSubquery, boolean isTable, boolean isArrayMainTable) throws Exception {
9090
return new DemoObjectParser(getSession(), request, parentPath, arrayConfig
9191
, isSubquery, isTable, isArrayMainTable).setMethod(getMethod()).setParser(this);
9292
}
9393

9494
@Override
95-
public FunctionParser createFunctionParser() {
95+
public FunctionParser<Long> createFunctionParser() {
9696
return new DemoFunctionParser();
9797
}
9898

9999
@Override
100-
public SQLConfig createSQLConfig() {
100+
public SQLConfig<Long> createSQLConfig() {
101101
return new DemoSQLConfig();
102102
}
103103

104104
@Override
105-
public SQLExecutor createSQLExecutor() {
105+
public SQLExecutor<Long> createSQLExecutor() {
106106
return new DemoSQLExecutor();
107107
}
108108

@@ -111,11 +111,13 @@ public Verifier<Long> createVerifier() {
111111
return new DemoVerifier();
112112
}
113113

114-
private FunctionParser functionParser;
115-
public FunctionParser getFunctionParser() {
114+
private FunctionParser<Long> functionParser;
115+
public FunctionParser<Long> getFunctionParser() {
116116
return functionParser;
117117
}
118-
public Object onFunctionParse(String key, String function, String parentPath, String currentName, JSONObject currentObject, boolean containRaw) throws Exception {
118+
119+
public Object onFunctionParse(String key, String function, String parentPath, String currentName
120+
, JSONObject currentObject, boolean containRaw) throws Exception {
119121
if (functionParser == null) {
120122
functionParser = createFunctionParser();
121123
functionParser.setMethod(getMethod());

APIJSON-Java-Server/APIJSONDemo-SpringBoot3/src/main/java/apijson/demo/DemoSQLConfig.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ protected void onJoinNotRelation(String sql, String quote, Join j, String jt, Li
109109
// 开启 JOIN ON t1.c1 != t2.c2 等不等式关联 super.onJoinNotRelation(sql, quote, j, jt, onList, on);
110110
}
111111
@Override
112-
protected void onJoinComplextRelation(String sql, String quote, Join j, String jt, List<On> onList, On on) {
113-
// 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplextRelation(sql, quote, j, jt, onList, on);
112+
protected void onJoinComplexRelation(String sql, String quote, Join j, String jt, List<On> onList, On on) {
113+
// 开启 JOIN ON t1.c1 LIKE concat('%', t2.c2, '%') 等复杂关联 super.onJoinComplexRelation(sql, quote, j, jt, onList, on);
114114
}
115115

116116

0 commit comments

Comments
 (0)