加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

applicationcontext.xml配置的问题

发布时间:2020-12-16 06:15:15 所属栏目:百科 来源:网络整理
导读:一、applicationcontext.xml的位置 1、如果将applicationcontext.xml放在src下,web.xml添加配置 我写成classpath*:*.xml加载不了。。。不知道为什么。。 2、如果将applicationcontext.xml放在web.xml同目录下(web-inf),无需在web.xml中配置。 3、随便放

一、applicationcontext.xml的位置
1、如果将applicationcontext.xml放在src下,web.xml添加配置

我写成classpath*:*.xml加载不了。。。不知道为什么。。

2、如果将applicationcontext.xml放在web.xml同目录下(web-inf),无需在web.xml中配置。

3、随便放在那个路径,只要配置相应路径就ok,参看1。

二、另外applicationcontext.xml中加载hbm的时候,如果报错 FileNotFound,那么注意:
mappingLocations 对应 classpath:/resources/hbm/*/.hbm.xml

mappingDirectoryLocations 对应 classpath*:/resource/hbm

mappingResources 对应 uiyresource/hbm/user.hbm.xml

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读