spring boot 配置多数据源
mybatis配置项 import com.alibaba.druid.pool.DruidDataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import javax.sql.DataSource; import java.util.HashMap; import java.util.Map; @Configuration public class MyBatisConfig { @Autowired private DatabaseProperties databaseProperties; /** * 本地数据源 * @return */ public DataSource