Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optimize][Admin]Optimize program start #3784

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dinky-admin/src/main/java/org/dinky/Dinky.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.alibaba.druid.proxy.DruidDriver;

import lombok.SneakyThrows;

/**
Expand All @@ -43,6 +45,11 @@ public class Dinky {

@SneakyThrows
public static void main(String[] args) {
// Initialize the JDBC Driver, because the number of packages is very large, so it needs to be executed
// asynchronously and loaded in advance
// chinese: 初始化JDBC Driver,因为包的数量特别庞大,所以这里需要异步执行,并提前加载Driver
new Thread(DruidDriver::getInstance).start();

SpringApplication app = new SpringApplication(Dinky.class);
app.run(args);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Clickhouse20ExportParameterVisitor extends Clickhouse20OutputVisito
private final boolean requireParameterizedOutput;

public Clickhouse20ExportParameterVisitor(
final List<Object> parameters, final Appendable appender, final boolean wantParameterizedOutput) {
final List<Object> parameters, final StringBuilder appender, final boolean wantParameterizedOutput) {
super(appender, true);
this.parameters = parameters;
this.requireParameterizedOutput = wantParameterizedOutput;
Expand All @@ -52,7 +52,7 @@ public Clickhouse20ExportParameterVisitor(final List<Object> parameters) {
this(parameters, new StringBuilder(), false);
}

public Clickhouse20ExportParameterVisitor(final Appendable appender) {
public Clickhouse20ExportParameterVisitor(final StringBuilder appender) {
this(new ArrayList<Object>(), appender, true);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@

public class Clickhouse20OutputVisitor extends SQLASTOutputVisitor implements Clickhouse20Visitor {

public Clickhouse20OutputVisitor(Appendable appender) {
public Clickhouse20OutputVisitor(StringBuilder appender) {
super(appender, DbType.clickhouse);
}

public Clickhouse20OutputVisitor(Appendable appender, DbType dbType) {
public Clickhouse20OutputVisitor(StringBuilder appender, DbType dbType) {
super(appender, dbType);
}

public Clickhouse20OutputVisitor(Appendable appender, boolean parameterized) {
public Clickhouse20OutputVisitor(StringBuilder appender, boolean parameterized) {
super(appender, parameterized);
}

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<commons-lang3.version>3.3.2</commons-lang3.version>
<dinky.flink.version>1.18</dinky.flink.version>
<docker.java.version>3.2.14</docker.java.version>
<druid-starter>1.2.15</druid-starter>
<druid-starter>1.2.23</druid-starter>
<easy.rules.version>4.1.0</easy.rules.version>
<fastjson2.version>2.0.41</fastjson2.version>
<flink.version>1.18.1</flink.version>
Expand All @@ -69,7 +69,7 @@
<hamcrest.version>1.3</hamcrest.version>
<hibernate-validator.version>6.2.0.Final</hibernate-validator.version>
<httpclient.version>4.5.13</httpclient.version>
<hutool.version>5.8.27</hutool.version>
<hutool.version>5.8.31</hutool.version>
<jackson.version>2.14.1</jackson.version>
<jakarta.ws.rs-api.version>2.1.6</jakarta.ws.rs-api.version>
<jasypt.version>1.9.3</jasypt.version>
Expand Down
Loading