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

cn.mybatis.mp.routing.datasource.DataSourceProperties Maven / Gradle / Ivy

There is a newer version: 1.7.2
Show newest version
package cn.mybatis.mp.routing.datasource;

import cn.mybatis.mp.routing.datasource.dataSourceConfig.ConfigType;
import cn.mybatis.mp.routing.datasource.dataSourceConfig.DruidConfig;
import cn.mybatis.mp.routing.datasource.dataSourceConfig.HikariConfig;

import java.util.Properties;

public class DataSourceProperties extends org.springframework.boot.autoconfigure.jdbc.DataSourceProperties {

    /**
     * 配置的类型
     */
    private ConfigType configType;

    /**
     * hikari 数据连接池配置
     */
    private HikariConfig hikari;

    /**
     * druid 数据连接池配置
     */
    private DruidConfig druid;

    /**
     * other 数据连接池配置
     */
    private Properties other;

    public ConfigType getConfigType() {
        return configType;
    }

    public HikariConfig getHikari() {
        return hikari;
    }

    public void setHikari(HikariConfig hikari) {
        this.hikari = hikari;
        this.configType = ConfigType.HIKARI;
    }

    public DruidConfig getDruid() {
        return druid;
    }

    public void setDruid(DruidConfig druid) {
        this.druid = druid;
        this.configType = ConfigType.DRUID;
    }

    public Properties getOther() {
        return other;
    }

    public void setOther(Properties other) {
        this.other = other;
        this.configType = ConfigType.OTHER;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy