Skip to content
This repository was archived by the owner on May 8, 2021. It is now read-only.

Commit cb67b37

Browse files
committed
Update DefaultDataSourceHandler.java
1 parent 097fd08 commit cb67b37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

common/src/main/java/com/glyart/asql/common/defaults/DefaultDataSourceHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ public DefaultDataSourceHandler(@NotNull DataSourceCredentials credentials, @Nul
2828
private void initConfig(String poolName) {
2929
if (credentials.getProperties() == null) {
3030
hikariConfig = new HikariConfig();
31-
hikariConfig.setJdbcUrl(String.format("jdbc:mysql://%s:%s/%s", credentials.getHostname(), credentials.getPort(), credentials.getDatabase()));
31+
hikariConfig.setJdbcUrl(String.format("jdbc:mysql://%s:%s", credentials.getHostname(), credentials.getPort()));
3232
hikariConfig.setUsername(credentials.getUsername());
3333
hikariConfig.setPassword(credentials.getPassword());
34+
hikariConfig.setSchema(credentials.getDatabase());
3435
if (poolName != null)
3536
hikariConfig.setPoolName(poolName);
3637

0 commit comments

Comments
 (0)