|
|
|
@ -40,6 +40,7 @@ import com.fr.workspace.server.repository.WorkplaceConstants;
|
|
|
|
|
import com.fr.workspace.server.repository.connection.ConnectionCacheEvent; |
|
|
|
|
import com.fr.workspace.server.repository.connection.ConnectionRepository; |
|
|
|
|
import com.fr.workspace.server.repository.tabledata.DataEncryptionHelper; |
|
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
@ -123,8 +124,12 @@ public class ConnectionInfoBeanHelper {
|
|
|
|
|
/** |
|
|
|
|
* 根据bean创建连接 |
|
|
|
|
*/ |
|
|
|
|
@Nullable |
|
|
|
|
public static Connection createConnection(ConnectionInfoBean infoBean) { |
|
|
|
|
try { |
|
|
|
|
if (infoBean == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
Connection connection = cache.get(VALUE).get(infoBean.getConnectionName()); |
|
|
|
|
if (connection != null) { |
|
|
|
|
connection.setConnectionName(infoBean.getConnectionName()); |
|
|
|
|