我试图找出我正在维护,使用的应用程序的数据库表的数量.我在appContext.xml中有这个
<context:component-scan base-package="com.foo, com.bar" use-default-filters="false">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />
<context:include-filter type="annotation" expression="org.springframework.stereotype.Component" />
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
</context:component-scan>
....
<jpa:repositories base-package="com.foo.abc, com.bar.def" />
Run Code Online (Sandbox Code Playgroud)
还有其他与该项目相关的子项目,@Entity并且@Repository已经广泛使用.我想如果我能够以某种方式打开Spring的调试,它将列出所有类名,并且当它基于基础包扫描它们时,我应该能够找到所有jpa存储库.如何打开弹簧调试以吐出这些信息?
这就是我在log4j.properties中的内容:
log4j.rootLogger=error, file
log4j.category.org.hibernate=debug, hb
log4j.category.org.springframework=debug, spring
Run Code Online (Sandbox Code Playgroud)