Skip to content

Commit

Permalink
过滤关键字
Browse files Browse the repository at this point in the history
过滤掉sql中的关键字,如:key会过滤为 `key`
  • Loading branch information
xi-mad authored Jun 11, 2018
1 parent a8f93a5 commit fa78aec
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public void generate() throws Exception {
Configuration configuration = new Configuration();
Context context = new Context(ModelType.CONDITIONAL);
configuration.addContext(context);

context.addProperty("autoDelimitKeywords", "true");
context.addProperty("beginningDelimiter", "`");
context.addProperty("endingDelimiter", "`");

context.addProperty("javaFileEncoding", "UTF-8");
String connectorLibPath = ConfigHelper.findConnectorLibPath(selectedDatabaseConfig.getDbType());
_LOG.info("connectorLibPath: {}", connectorLibPath);
Expand Down

0 comments on commit fa78aec

Please sign in to comment.