maven构建 出错:cannot be resolved to absolute file path because it does not reside in the file system

编程入门 行业动态 更新时间:2024-10-28 09:13:19

maven构建 出错:cannot be resolved to <a href=https://www.elefans.com/category/jswz/34/1727035.html style=absolute file path because it does not reside in the file system"/>

maven构建 出错:cannot be resolved to absolute file path because it does not reside in the file system

问题总结:使用maven分模块组件项目的时候,domain中的实体的*.hbm.xml文件不能被spring扫描到,因为聚合的时候核心包已经达成jar包了,所以要去jar中去找hbm.xml文件

<bean name="sessionFactory"class="org.springframework.orm.hibernate5.LocalSessionFactoryBean"><property name="dataSource" ref="dataSource" /><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop><!-- 可选配置 --><prop key="hibernate.show_sql">false</prop><prop key="hibernate.format_sql">true</prop><prop key="hibernate.hbm2ddl.auto">update</prop><prop key="cache.provider_class">org.hibernate.cache.internal.NoCacheProvider</prop></props></property><!-- 引入orm元数据,指定orm元数据所在的包路径,spring会自动读取包中的所有配置 --><!-- <property name="mappingDirectoryLocations" value="classpath:com/jason/domain/" /> --><!-- 应该用以下方式代替 --><property name="mappingJarLocations"><list><value>WEB-INF/lib/clicli_core-0.0.1-SNAPSHOT.jar</value></list></property>
</bean>




更多推荐

maven构建 出错:cannot be resolved to absolute file path because it does not reside i

本文发布于:2024-02-24 18:15:45,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1696239.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:absolute   resolved   maven   file   system

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!