springboot手动注入bean,datasource延迟初始化。多数据源配置
package com.abcd.config;import org.springframework.boot.jdbc.DataSourceBuilder;import org.springframework.context.annotation.Bean;import org.springframework.stereotype.Component;import javax.sql.DataSource;@Componentpublic class DataSourceConfig {
原创
2021-06-12 10:41:52 ·
3227 阅读 ·
1 评论