我正在使用Spring 5和Hibernate 5,我正在配置Hibernate映射文件:
我的applicationContext.xml文件中的org.springframework.orm.hibernate5.LocalSessionFactoryBean
是这样的:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="mappingDirectoryLocations" value="com/myorg/division/myapp/model" />
但是当我将WAR文件部署到本地Weblogic服务器时,我收到此错误运行时错误:
Deployment Message : weblogic.application.ModuleException: java.io.FileNotFoundException: ServletContext resource [/com/
myorg/division/myapp/model] cannot be resolved to absolute file path - web application archive not expanded?
答案 0 :(得分:0)
这应该做的工作
<property name="packagesToScan" value="com.myorg.division.myapp.model" />