我正在使用 schemacrawler 从 mysql 数据库中获取表列表。问题是,结果包括来自所有可用数据库的表。它从给定的数据库名称(DataSource)之外获取表。
<bean id="schemaCrawlerOptions" class="schemacrawler.schemacrawler.SchemaCrawlerOptions">
<property name="sequenceInclusionRule">
<bean class="schemacrawler.schemacrawler.IncludeAll" />
</property>
<property name="tableTypes">
<set>
<value>TABLE</value>
<!-- <value>VIEW</value> -->
</set>
</property>
<property name="schemaInfoLevel">
<bean factory-method="standard"
class="schemacrawler.schemacrawler.SchemaInfoLevel" />
</property>
</bean>
<bean id="executableForSchema" class="schemacrawler.tools.text.schema.SchemaTextExecutable"> <!-- This is the final class we need to execute schemacrawler -->
<constructor-arg value="schema" />
<property name="schemaCrawlerOptions" ref="schemaCrawlerOptions" />
<property name="schemaTextOptions">
<bean class="schemacrawler.tools.text.schema.SchemaTextOptions">
<property name="showOrdinalNumbers" value="false" />
<property name="showStandardColumnTypeNames" value="false" />
<property name="hidePrimaryKeyNames" value="true" />
<property name="hideIndexNames" value="true" />
<property name="hideForeignKeyNames" value="true" />
<property name="hideConstraintNames" value="true" />
<property name="noInfo" value="false" />
</bean>
</property>
<property name="outputOptions" ref="outputOptions" />
</bean>
这是我的春天背景。