dbname with minus('-') can not be parsed in ob writer

This commit is contained in:
江煦 2021-09-18 19:51:03 +08:00
parent 59f1825016
commit c0351b8d76

View File

@ -31,7 +31,7 @@ public class ServerConnectInfo {
}
private void parseJdbcUrl(final String jdbcUrl) {
Pattern pattern = Pattern.compile("//([\\w\\.\\-]+:\\d+)/([\\w]+)\\?");
Pattern pattern = Pattern.compile("//([\\w\\.\\-]+:\\d+)/([\\w-]+)\\?");
Matcher matcher = pattern.matcher(jdbcUrl);
if (matcher.find()) {
String ipPort = matcher.group(1);