在啓動類裏面單獨增長一個Bean便可解決mysql
@Bean public DatabaseIdProvider getDatabaseIdProvider(){ DatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider(); Properties properties = new Properties(); properties.setProperty("Oracle1","oracle"); properties.setProperty("MySQL","mysql"); databaseIdProvider.setProperties(properties); return databaseIdProvider; }