1.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring-mybatis.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filterChainDefinitions' threw exception; nested exception is java.lang.IllegalArgumentException: Line argument must contain a key and a value. ?Only one string token was found.
報(bào)這個(gè)錯(cuò)誤是因?yàn)?? ShiroFilterFactoryBean(shiro工廠類)的 ?fulterChainDefinitions這個(gè)屬性中的配置必須是鍵值對(duì)形式的.
因?yàn)槲沂褂昧薳clipse的自動(dòng)格式化的快捷鍵導(dǎo)致 ? ?換行,所以才會(huì)出現(xiàn)這個(gè)錯(cuò)誤 .
所以解決方法就是 檢查一下是否是 ?鍵值對(duì) ? 且 ?必須在一行
2.
提示數(shù)據(jù)庫沒有K用戶.
這個(gè)問題的原因是因?yàn)?spring在加載配置文件的時(shí)候,先加載的shiro的配置,后加載的mybatis,調(diào)整加載順序就可以了