All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.schoolwow.quickdao.module.initial.flow.database.SetDatabaseNameFlow Maven / Gradle / Ivy

There is a newer version: 5.3.1
Show newest version
package cn.schoolwow.quickdao.module.initial.flow.database;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import com.zaxxer.hikari.HikariDataSource;

public class SetDatabaseNameFlow implements BusinessFlow {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        String jdbcUrl = (String) flowContext.checkData("jdbcUrl");

        String databaseName = jdbcUrl.substring(jdbcUrl.lastIndexOf("/")+1, jdbcUrl.contains("?")?jdbcUrl.indexOf("?"):jdbcUrl.length());
        flowContext.putTemporaryData("databaseName", databaseName);
    }

    @Override
    public String name() {
        return "设置数据库名称";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy