一、添加数据
private final DynamicRoutingDataSource dynamicRoutingDataSource;
private final DefaultDataSourceCreator dataSourceCreator;
//添加一个dynamic的数据源
@GetMapping("createDynamic")
public void createDynamic() {
DataSourceProperty property = new DataSourceProperty();
//
property.setDriverClassName("com.mysql.cj.jdbc.Driver");
property.setType(HikariDataSource.class);
property.setUrl("jdbc:mysql://localhost:3306/ry-vue-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true");
property.setUserna