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别人的 根据自己的环境配置才行。
本文介绍了在使用SpringSecurity过程中遇到的版本不匹配问题及其解决方案。作者在搭建SpringSecurity时遇到了与Spring版本不一致导致的异常,并通过调整依赖版本解决了该问题。
6047

被折叠的 条评论
为什么被折叠?



