Browse Source

无JIRA fix: 修复打包

fbp-1.0
Anner 3 months ago
parent
commit
917cba3f70
  1. 20
      designer-realize/src/main/java/com/fanruan/data/ConnectionConfigWrapper.java

20
designer-realize/src/main/java/com/fanruan/data/ConnectionConfigWrapper.java

@ -4,6 +4,7 @@ import com.fanruan.config.impl.data.ConnectionConfigProvider;
import com.fanruan.config.impl.data.ConnectionConfigWriter;
import com.fr.data.impl.Connection;
import com.fr.file.ConnectionConfig;
import com.fr.log.FineLoggerFactory;
import com.fr.transaction.Configurations;
import com.fr.transaction.WorkerAdaptor;
import org.jetbrains.annotations.NotNull;
@ -140,7 +141,24 @@ public class ConnectionConfigWrapper implements ConnectionConfigProvider, Connec
}
});
}
@Override
public boolean updateConnection(String oldName, String connName, Connection connection) {
try {
Configurations.update(new WorkerAdaptor(ConnectionConfig.class) {
@Override
public void run() {
ConnectionConfig.getInstance().removeConnection(oldName);
ConnectionConfig.getInstance().addConnection(connName, connection);
}
});
return true;
} catch (Exception e) {
FineLoggerFactory.getLogger().error("update old connection fail , old name is {} , new name is {}", oldName, connection);
}
return false;
}
@Override
public boolean isPutPermitted() {
return ConnectionConfig.getInstance().isPutPermitted();

Loading…
Cancel
Save