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

com.jchanghong.db.ds.simple.SimpleDSFactory Maven / Gradle / Ivy

The newest version!
package com.jchanghong.db.ds.simple;

import javax.sql.DataSource;

import com.jchanghong.db.ds.AbstractDSFactory;
import com.jchanghong.setting.Setting;

/**
 * 简单数据源工厂类
 * 
 * @author Looly
 *
 */
public class SimpleDSFactory extends AbstractDSFactory {
	private static final long serialVersionUID = 4738029988261034743L;
	
	public static final String DS_NAME = "Hutool-Simple-DataSource";

	public SimpleDSFactory() {
		this(null);
	}

	public SimpleDSFactory(Setting setting) {
		super(DS_NAME, SimpleDataSource.class, setting);
	}

	@Override
	protected DataSource createDataSource(String jdbcUrl, String driver, String user, String pass, Setting poolSetting) {
		return new SimpleDataSource(//
				jdbcUrl, //
				user, //
				pass, //
				driver//
		);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy