使用security报错:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource
错误信息:
问题代码:
解决代码:
总结:访问 路径少写了一个斜杠。
其他:
出现类似的情况,也有可能是因为Bean未注入,写漏了某些注解(例如服务类少写@Service注解等)