Java 休眠映射位置指定?

Java 休眠映射位置指定?,java,spring,hibernate,Java,Spring,Hibernate,我正在使用spring和hibernate。我将映射位置指定为: 我的文件夹结构如下: src/main/resources . ...hibernate . .....hibernate2 <property name="mappingLocations" value="classpath:hibernate/*.hbm.xml" /> src/main/resources . 冬眠 . …冬眠 上面的属性只查看hibernate文件夹,而不查看子文件夹。如

我正在使用spring和hibernate。我将映射位置指定为:

我的文件夹结构如下:

src/main/resources
.
...hibernate
    .
    .....hibernate2


<property name="mappingLocations" value="classpath:hibernate/*.hbm.xml" />
src/main/resources
.
冬眠
.
…冬眠

上面的属性只查看hibernate文件夹,而不查看子文件夹。如何强制在子文件夹中查找hbm文件?

插入通配符*,如下所示

<property name="mappingLocations" value="classpath*:hibernate/**/*.hbm.xml" />

插入通配符*,如下所示

<property name="mappingLocations" value="classpath*:hibernate/**/*.hbm.xml" />