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

org.zodiac.autoconfigure.datasource.DataSourceConfigAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.datasource;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.datasource.condition.ConditionalOnDataSourceEnabled;
import org.zodiac.commons.constants.SystemPropertiesConstants;
import org.zodiac.core.context.annotation.ImportPropertySources;

@SpringBootConfiguration
@ConditionalOnDataSourceEnabled
@ImportPropertySources(value = {"classpath:/META-INF/config/datasource.yml"})
//@PropertySource(value = {"classpath:/META-INF/config/datasource.properties"})
@ConditionalOnClass(name = {"org.zodiac.datasource.config.DataSourceConfigInfo"})
public class DataSourceConfigAutoConfiguration {

    public DataSourceConfigAutoConfiguration() {
        super();
    }

    @Bean
    @ConditionalOnMissingBean
    @ConfigurationProperties(prefix = SystemPropertiesConstants.Zodiac.SPRING_DATASOURCE_PREFIX)
    protected DataSourceConfigProperties dataSourceConfigProperties() {
        return new DataSourceConfigProperties();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy