SecurityMetadataSource does not support secure object class
Caused by: java.lang.IllegalArgumentException: SecurityMetadataSource does not support secure object class: class org.springframework.security.web.FilterInvocation at org.springframework.util.Assert.isTrue(Assert.java:65) at org.springframework.security.access.intercept.AbstractSecurityInterceptor.afterPropertiesSet(AbstractSecurityInterceptor.java:123) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 46 more
出现这个错误,网上找了很久都没满意的答案,最后发现关键字应该为not support,
@Override
public boolean supports(Class<?> arg0) {
return false;
}
解决方法: supports中的false改为true
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。