暂存提交
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ public class WarehouseDatabaseGuardConfiguration {
|
||||
static BeanFactoryPostProcessor warehouseDatabaseGuard(Environment environment) {
|
||||
String url = environment.getProperty("spring.datasource.url", "").trim();
|
||||
Matcher matcher = MYSQL_SCHEMA.matcher(url);
|
||||
if (!matcher.matches() || !"baiyue_warehouse_overseas".equalsIgnoreCase(matcher.group(1))) {
|
||||
if (!matcher.matches() || !"baiyue_lastlag_warehouse".equalsIgnoreCase(matcher.group(1))) {
|
||||
throw new IllegalStateException(
|
||||
"warehouse-overseas-service requires spring.datasource.url to target the baiyue_warehouse_overseas database");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user