xiaomizhou2 commented on code in PR #29704:
URL: https://github.com/apache/shardingsphere/pull/29704#discussion_r1454960929
##########
jdbc/core/src/main/java/org/apache/shardingsphere/driver/jdbc/core/driver/spi/AbsolutePathURLProvider.java:
##########
@@ -55,10 +57,28 @@ public byte[] getContent(final String url, final String
urlPrefix) {
String line;
while (null != (line = reader.readLine())) {
if (!line.startsWith("#")) {
+ line = replaceVariables(line);
builder.append(line).append('\n');
}
}
return builder.toString().getBytes(StandardCharsets.UTF_8);
}
}
+
+ private String replaceVariables(final String line) {
+ Pattern variablePattern = Pattern.compile("\\$\\{(.+?)\\}");
Review Comment:
- I should know where the conflict is going to be, but using `#{(.+?)}`
would be considered a comment, so my current approach may not work well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]