fwq
2024-09-27 4034fdffb309c5636c2f7430b8f52bc2b0f2b514
提交 | 用户 | age
739bf5 1 package com.hx.phip.config;
C 2
3 import com.alibaba.druid.pool.DruidDataSource;
4 import org.springframework.boot.context.properties.ConfigurationProperties;
5 import org.springframework.context.annotation.Bean;
6 import org.springframework.context.annotation.Configuration;
7
8 import javax.sql.DataSource;
9
10 /**
11  * Druid配置类
12  */
13 //@Configuration
14 public class DruidConfig {
15
16
17
18     @Bean
19     @ConfigurationProperties(prefix = "spring.datasource")
20     public DataSource druidDataSource(){
21         return new DruidDataSource();
22     }
23
24 }