ITeye博客

[转]Spring Component-scan和eclipse export jar兼容问题

badwing · 2012-03-08 20:39 · spring · 开源软件 · Markdown

Spring使用component-scan的时候,如果把spring bean打包到jar文件中,spring无法找到相应的bean

要处理正确很简单:当使用eclipse export成.jar的时候,把add directory entries选上就可以了

或者使用下列打包方法:

jar cvf jj.jar com META-INF jdbc.properties beans.xml

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。