//package com.sckw.slope.detection.common.config.dateSource;
//
//import com.zaxxer.hikari.HikariDataSource;
//import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.boot.jdbc.DataSourceBuilder;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//
//import javax.sql.DataSource;
//
///**
// * @author lfdc
// * @description
// * @date 2023-11-19 10:11:29
// */
//
//@Configuration
//public class MyDataSourceConfig {
//    @ConfigurationProperties(prefix = "spring.datasource")
//    @Primary
//    @Bean
//    public DataSource dataSource(DataSourceProperties properties){
////        return DataSourceBuilder.create(properties.getClassLoader())
////                .type(HikariDataSource.class)
////                .driverClassName(properties.determineDriverClassName())
////                .url(properties.determineUrl())
////                .username(properties.determineUsername())
////                .password(properties.determinePassword())
////                .build();
//        return DataSourceBuilder.create(properties.getClassLoader())
//                .type(HikariDataSource.class)
//                .driverClassName(properties.determineDriverClassName())
//                .url(properties.determineUrl())
//                .username(properties.determineUsername())
//                .password(properties.determinePassword())
//                .build();
//    }
//}
