黑马程序员技术交流社区

标题: eclipse中明明导入了oscache包 ,为什么编译仍然不通过,报..... [打印本页]

作者: 万马奔腾    时间: 2014-5-29 18:47
标题: eclipse中明明导入了oscache包 ,为什么编译仍然不通过,报.....
org.springframework.beans.factory.BeanDefinitionStoreException: Line 150 in XML document from ServletContext resource [/WEB-INF/mypro-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 150; columnNumber: 85; The prefix "oscache" for element "oscache:config" is not bound.
Caused by: org.xml.sax.SAXParseException; lineNumber: 150; columnNumber: 85; The prefix "oscache" for element "oscache:config" is not bound.


在mypro-servlet.xml中配置如下:
<!-- 缓存配置 -->
    <oscache:config configLocation="classpath:oscache.properties" id="cacheProvider" />
    <oscache:annotations providerId="cacheProvider">
        <oscache:caching id="caching" cronExpression="0 1 * * *" refreshPeriod="86400" />
        <oscache:flushing id="flushing" />
    </oscache:annotations>


oscache包是想通过maven导入,结果没有导入成功,就自己手动导入,并且完成相应配置,整个项目没有报错,不知道为什么项目还是无法编译通过。

求高人指点,谢谢!


作者: 万马奔腾    时间: 2014-5-31 16:37
自己顶起,没有人回答一下啊 ,苦闷啊
作者: More    时间: 2014-5-31 16:59
导入包到eclipse中,在你想导入的工程上右击选中Properties,在Properties页面中选中Java Build Path,选中Libraries标签,点击Add External JARs。然后加入你想导入的包就行了
作者: 万马奔腾    时间: 2014-6-1 17:19
More 发表于 2014-5-31 16:59
导入包到eclipse中,在你想导入的工程上右击选中Properties,在Properties页面中选中Java Build Path,选中 ...

这些我都知道,不过还是谢谢啊




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2