Skip to content

Commit 9d68325

Browse files
committed
feat: apijson 7.0.3
1 parent 1efd40c commit 9d68325

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

pom.xml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<spring-cloud-alibaba.version>2022.0.0.0</spring-cloud-alibaba.version>
2424
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2525
<mysql.version>8.0.31</mysql.version>
26-
<native-maven-plugin.version>0.10.0</native-maven-plugin.version>
26+
<native-maven-plugin.version>0.10.2</native-maven-plugin.version>
2727
<mybatis-plus.version>3.5.5</mybatis-plus.version>
2828
<dynamic-datasource.version>4.3.0</dynamic-datasource.version>
2929
<p6spy.version>3.9.1</p6spy.version>
@@ -36,6 +36,8 @@
3636
<hutool-all.version>5.8.16</hutool-all.version>
3737
<lombok.version>1.18.30</lombok.version>
3838
<flow.version>1.2.0</flow.version>
39+
<apijson.version>7.0.3</apijson.version>
40+
<apijson-router.version>2.0.3</apijson-router.version>
3941
</properties>
4042
<!-- 模块 -->
4143
<modules>
@@ -336,19 +338,19 @@
336338
<dependency>
337339
<groupId>com.github.Tencent</groupId>
338340
<artifactId>APIJSON</artifactId>
339-
<version>7.0.0</version>
341+
<version>${apijson.version}</version>
340342
</dependency>
341343

342344
<dependency>
343345
<groupId>com.github.APIJSON</groupId>
344346
<artifactId>apijson-framework</artifactId>
345-
<version>7.0.0</version>
347+
<version>${apijson.version}</version>
346348
</dependency>
347349

348350
<dependency>
349351
<groupId>com.github.APIJSON</groupId>
350352
<artifactId>apijson-router</artifactId>
351-
<version>2.0.0</version>
353+
<version>${apijson-router.version}</version>
352354
</dependency>
353355

354356
<!-- flow 依赖 -->
@@ -388,6 +390,23 @@
388390
</layers>
389391
</configuration>
390392
</plugin>
393+
394+
<plugin>
395+
<groupId>org.graalvm.buildtools</groupId>
396+
<artifactId>native-maven-plugin</artifactId>
397+
<version>${native-maven-plugin.version}</version>
398+
<extensions>true</extensions>
399+
<executions>
400+
<execution>
401+
<id>build-native</id>
402+
<goals>
403+
<goal>compile-no-fork</goal>
404+
</goals>
405+
<phase>package</phase>
406+
</execution>
407+
</executions>
408+
</plugin>
409+
391410
</plugins>
392411
</pluginManagement>
393412

quick-boot-online/quick-boot-online-controller/src/main/java/com/quick/online/config/OnlineSQLConfig.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
import apijson.JSONRequest;
44
import apijson.RequestMethod;
55
import apijson.framework.APIJSONSQLConfig;
6-
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
7-
import com.quick.common.util.SpringBeanUtils;
8-
import com.quick.online.entity.Access;
9-
import com.quick.online.service.IAccessService;
106
import jakarta.annotation.PostConstruct;
117
import lombok.extern.slf4j.Slf4j;
128
import org.springframework.beans.factory.annotation.Value;
@@ -126,20 +122,6 @@ public String getSQLTable() {
126122
return isInfluxDB() ? t.toLowerCase() : JSONRequest.recoverUnderline(t, false);
127123
}
128124

129-
/**
130-
* 实现跨库查询
131-
* @return
132-
*/
133-
@Override
134-
public String getSQLSchema() {
135-
// 查找表的数据库
136-
IAccessService accessService = SpringBeanUtils.getBean(IAccessService.class);
137-
Access access = accessService.getOne(new LambdaQueryWrapper<Access>().eq(Access::getAlias, this.getTable()));
138-
String schema = access.getSchema();
139-
return schema;
140-
}
141-
142-
143125
// 取消注释后,默认的数据库类型会由 MySQL 改为 PostgreSQL
144126
@Override
145127
public String getDatabase() {
@@ -149,10 +131,6 @@ public String getDatabase() {
149131

150132
@Override
151133
public String getDatasource() {
152-
// 查找表的数据库
153-
IAccessService accessService = SpringBeanUtils.getBean(IAccessService.class);
154-
Access access = accessService.getOne(new LambdaQueryWrapper<Access>().eq(Access::getAlias, this.getTable()));
155-
String schema = access.getSchema();
156-
return schema;
134+
return super.getSQLSchema();
157135
}
158136
}

0 commit comments

Comments
 (0)