use of io.quarkus.runtime.RuntimeValue in project quarkus-mybatis by quarkiverse.
the class QuarkusDataSource method createSqlSessionFactory.
public RuntimeValue<SqlSessionFactory> createSqlSessionFactory(ConfigurationFactory configurationFactory, SqlSessionFactoryBuilder builder, MyBatisRuntimeConfig myBatisRuntimeConfig, MyBatisDataSourceRuntimeConfig myBatisDataSourceRuntimeConfig, String dataSourceName, List<String> mappers, List<String> mappedTypes, List<String> mappedJdbcTypes) {
Configuration configuration = configurationFactory.createConfiguration();
setupConfiguration(configuration, myBatisRuntimeConfig, myBatisDataSourceRuntimeConfig, dataSourceName);
addMappers(configuration, myBatisRuntimeConfig, mappedTypes, mappedJdbcTypes, mappers, dataSourceName);
SqlSessionFactory sqlSessionFactory = builder.build(configuration);
return new RuntimeValue<>(sqlSessionFactory);
}
Aggregations