package com.demo.config;
import com.alibaba.druid.pool.DruidDataSource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;
import java.sql.SQLException;
import java.util.Properties;
/**
* @author
* @date 2022-12-19 20:11
* @since 1.8
*/
@Slf4j
//@Component
public class DataSourceMySql {
// /**
// * 获取配置
// * @return
// */
// @Bean(name = "druidProperties")
// @ConfigurationProperties(prefix = "spring.datasource")
// public Properties druidProperties(){
// return new Properties();
// }
//
// /**
// * @description: postgres dataSource
// * @params: [properties]
// * @return: com.alibaba.druid.pool.DruidDataSource
// * @create: 2022-08-18
// */
// @Primary
// @Bean(name = "druidDataSource")
// public DruidDataSource druidDataSource(@Qualifier("druidProperties")Properties properties){
// DruidDataSource druidDataSource = new DruidDataSource();
// druidDataSource.configFromPropety(properties);
// try {
// druidDataSource.init();
// } catch (SQLException e) {
// log.error("Datasource Init Exception:",e);
// }
// return druidDataSource;
// }
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
AppDemo - 副本.zip (12个子文件)
AppDemo - 副本
pom.xml 4KB
src
test
java
main
resources
mapper
DoctorMapper.xml 261B
templates
index.html 1KB
application.yml 1KB
java
com
demo
AppApplication.java 686B
mapper
DoctorMapper.java 199B
controller
ViewController.java 599B
entity
Department.java 232B
Patient.java 341B
Register.java 363B
Doctor.java 285B
config
DataSourceMySql.java 1KB
共 12 条
- 1
资源评论
猪悟道
- 粉丝: 8314
- 资源: 27
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功