package com.muyu.demos.web.config;//package com.muyu.config;
//
//import org.springframework.beans.factory.annotation.Value;
//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 javax.sql.DataSource;
//
///**
// * 第二个数据源 SecondaryDataSourceConfig
// *
// * @author Yangle
// * Date 2024/6/2 22:03
// */
//@Configuration
//public class SecondaryDataSourceConfig {
//
//    @Value("${datasource.secondary.url}")
//    private String url;
//
//    @Value("${datasource.secondary.username}")
//    private String username;
//
//    @Value("${datasource.secondary.password}")
//    private String password;
//
//    @Value("${datasource.secondary.driver-class-name}")
//    private String driverClassName;
//
//    @Bean(name = "secondaryDataSource")
//    @ConfigurationProperties(prefix = "datasource.secondary")
//    public DataSource secondaryDataSource() {
//        return DataSourceBuilder.create()
//                .url(url)
//                .username(username)
//                .password(password)
//                .driverClassName(driverClassName)
//                .build();
//    }
//
//}