我目前正在尝试使用JOOQ根据现有的Postgres DB生成类。在我的JOOQ .xml配置中,我省略了所有inputSchema标记,以便JOOQ生成它找到的所有模式:
<schemata>
<schema>
</schema>
</schemata>
但是,我想从生成的内容中排除信息模式。有没有办法以黑名单的方式做到这一点?还是我必须为除信息模式之外的所有模式添加输入模式?
您可以使用<excludes>
此处记录的配置:
http://www.jooq.org/doc/latest/manual/code-generation/codegen-configuration
<includes>.*</includes>
<excludes>
(?i:information_schema\..*) # I'm using (?i: ... ) for case-insensitivity here...
</excludes>
双方<includes>
并<excludes>
采取Java正则表达式作为参数,这使匹配不需要的模式相对容易。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句