【问题标题】:Where to put the hibernate configuration file when using Tomcat 7?使用 Tomcat 7 时,hibernate 配置文件放在哪里?
【发布时间】:2011-01-06 15:38:10
【问题描述】:

当我使用 Tomcat 7.0 部署 webapps (JSF 2.0) 时,我应该将配置文件 (hibernate.hbm.xml) 放在哪里?

当我将它放在 WEB-INF/classes/ 中时它可以工作,但那是“标准”路径吗?你把它放在哪里?

最好的问候

【问题讨论】:

    标签: hibernate tomcat


    【解决方案1】:

    它应该在类路径的根目录中。如果类路径中有两个目录,则 hibernate.cfg.xml 可以在其中任何一个中。对于 Web 应用程序,类路径的根是 WEB-INF/classes。

    【讨论】:

      猜你喜欢
      • 2012-12-01
      • 2019-07-01
      • 2017-11-19
      • 2014-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多