@JFinal 波总,在代码生成时,如果需要跳过某些表,需要自己实现MetaBuilder,覆写isSkipTable方法。建议可以增加一个方法,避免仅仅为了覆写isSkipTable方法而新创建一个类。具体实现如下:
public class MetaBuilder { protected Predicate<String> skipPredicate = null; protected boolean isSkipTable(String tableName) { boolean isSkip = false; if (skipPredicate != null) { isSkip = skipPredicate.test(tableName); } return isSkip; } /** * 指定过滤表规则 * <p><b>用法</b>:new MetaBuilder(dataSource).setSkipPredicate((Predicate<String>) tableName -> tableName.startsWith("bpm_"));</p> * @param predicate * @return */ protected MetaBuilder setSkipPredicate(Predicate<String> predicate) { skipPredicate = predicate; return this; } }
仅为建议,若无必要,忽略即可。