报错提示:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘shiroFilter’ defined in class path resource [applicationContext-shiro.xml]: Cannot resolve reference to bean ‘filterChainDefinitionMap’ while setting bean property ‘filterChainDefinitionMap’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘filterChainDefinitionMap’ defined in class path resource [applicationContext-shiro.xml]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.util.Map]: Factory method ‘getFilterChainDefinitionMap’ threw exception; nested exception is org.springframework.jdbc.BadSqlGrammarException:
查错肯定查第一句 org.springframework.beans.factory.BeanCreationException: Error creating bean with
在网上得到的全是BEEN没配置好
各种检查都没找到问题所在 一切都配置好了的
然后我一个字一个字读错误代码
最后一句 Factory method ‘getFilterChainDefinitionMap’ threw exception; nested exception is org.springframework.jdbc.BadSqlGrammarException:
通过工厂方法加载 但抛出jdbc异常 很明显这是SQL出错 就去查SQL 最后数据库表不对应 改了就好了