Spring 学习时遇到错误整理贴(会慢慢补充)

来源:互联网 发布:信誉出肉 淘宝 编辑:程序博客网 时间:2024/06/05 15:40

1(2016-04-17).搭建SpringSecurity 出现如下一个错误 很奇怪 怎么弄都不对
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext

这里写图片描述
后来发现jar包引入的是SpringSecurity3.1版本 spring是3.2版本 而springSecurity配置文件如下 是我从网上直接copy过来的没有细看, 所以我把beans.xsd 和 security.xsd 都修改成 相应的版本 就不报错了。所以配置的时候不要轻易copy别人的 根据自己的环境配置才行。
这里写图片描述

0 0
原创粉丝点击