配置完shiro權限字符串之後,啓動項目報錯。
錯誤信息如下:<br />
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.
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514)
... 22 more
問題分析:
根據錯誤信息可以看到是因爲權限字符串沒有編寫完整,是因爲權限字符串只有key,沒有value造成的錯誤
問題解決方法:
檢查applicationContext.xml配置文件,是否存在類似於/*.action = 之類的沒有編寫完整的權限字符串,如果有,修改即可