
io.quarkiverse.mybatis.runtime.QuarkusDataSourceFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-mybatis Show documentation
Show all versions of quarkus-mybatis Show documentation
MyBatis SQL mapper framework for Java
package io.quarkiverse.mybatis.runtime;
import java.util.Properties;
import javax.sql.DataSource;
import org.apache.ibatis.datasource.DataSourceFactory;
public class QuarkusDataSourceFactory implements DataSourceFactory {
private Properties properties;
private QuarkusDataSource dataSource;
public QuarkusDataSourceFactory() {
}
@Override
public void setProperties(Properties properties) {
this.properties = properties;
if (dataSource == null) {
dataSource = new QuarkusDataSource(properties.getProperty("db", ""));
}
}
@Override
public DataSource getDataSource() {
return dataSource;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy