springboot 动态实例化数据库bean,项目启动时默认实例化配置文件里写的,之后可以通过接口传参,传入新的数据库配置信息,如url、账户密码等,实例化新对象
收起
想自己造轮子可以看下我之前写的 https://blog.csdn.net/white_bird_shit/article/details/109496861不想造轮子可以使用 https://gitee.com/baomidou/dynamic-datasource-spring-boot-starter
报告相同问题?