|
|
@ -17,6 +17,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
package org.apache.dolphinscheduler.plugin.datasource.api.datasource; |
|
|
|
package org.apache.dolphinscheduler.plugin.datasource.api.datasource; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.plugin.datasource.api.utils.PasswordUtils; |
|
|
|
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; |
|
|
|
import org.apache.dolphinscheduler.spi.datasource.BaseConnectionParam; |
|
|
|
import org.apache.dolphinscheduler.spi.datasource.ConnectionParam; |
|
|
|
import org.apache.dolphinscheduler.spi.datasource.ConnectionParam; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.DbType; |
|
|
|
import org.apache.dolphinscheduler.spi.enums.DbType; |
|
|
@ -84,6 +85,6 @@ public abstract class AbstractDataSourceProcessor implements DataSourceProcessor |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public String getDatasourceUniqueId(ConnectionParam connectionParam, DbType dbType) { |
|
|
|
public String getDatasourceUniqueId(ConnectionParam connectionParam, DbType dbType) { |
|
|
|
BaseConnectionParam baseConnectionParam = (BaseConnectionParam) connectionParam; |
|
|
|
BaseConnectionParam baseConnectionParam = (BaseConnectionParam) connectionParam; |
|
|
|
return MessageFormat.format("{0}@{1}@{2}", dbType.getDescp(), baseConnectionParam.getUser(), baseConnectionParam.getJdbcUrl()); |
|
|
|
return MessageFormat.format("{0}@{1}@{2}@{3}", dbType.getDescp(), baseConnectionParam.getUser(), PasswordUtils.encodePassword(baseConnectionParam.getPassword()), baseConnectionParam.getJdbcUrl()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|