Search in sources :

Example 31 with RuntimeValue

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);
}
Also used : Configuration(org.apache.ibatis.session.Configuration) SqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory) RuntimeValue(io.quarkus.runtime.RuntimeValue)

Aggregations

RuntimeValue (io.quarkus.runtime.RuntimeValue)31 FhirContext (ca.uhn.fhir.context.FhirContext)4 BuildStep (io.quarkus.deployment.annotations.BuildStep)2 Record (io.quarkus.deployment.annotations.Record)2 CamelContext (org.apache.camel.CamelContext)2 Component (org.apache.camel.Component)2 KnativeComponent (org.apache.camel.component.knative.KnativeComponent)2 CamelProducers (org.apache.camel.quarkus.core.CamelProducers)2 ComponentCustomizer (org.apache.camel.spi.ComponentCustomizer)2 Logger (ch.qos.logback.classic.Logger)1 AWSLogs (com.amazonaws.services.logs.AWSLogs)1 AWSLogsClientBuilder (com.amazonaws.services.logs.AWSLogsClientBuilder)1 Configuration (freemarker.template.Configuration)1 Tracer (io.opentracing.Tracer)1 CloudWatchCredentialsProvider (io.quarkiverse.logging.cloudwatch.auth.CloudWatchCredentialsProvider)1 AdditionalBeanBuildItem (io.quarkus.arc.deployment.AdditionalBeanBuildItem)1 BeanRegistrationPhaseBuildItem (io.quarkus.arc.deployment.BeanRegistrationPhaseBuildItem)1 UnremovableBeanBuildItem (io.quarkus.arc.deployment.UnremovableBeanBuildItem)1 BuildExtension (io.quarkus.arc.processor.BuildExtension)1 ApplicationArchive (io.quarkus.deployment.ApplicationArchive)1