spring security

anabiosispe 2019-06-30 07:02:14
在研究spring Security的代码,core配置类中,定义了验证码图形验证码的实体类,正常是测试项目当没有对properties的图形验证码参数进行设定时,默认读取这个实体类中的属性值。但是,如图所示,如果“url”不赋值时springboot项目启动时就报空指针,初始化空值就可以运行起来。为什么会这样呢,请高手指教。谢谢。或加QQ349769307交流
报错如下:
2019-06-30 18:48:53.628 WARN 5892 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.NullPointerException


...全文
47 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

67,515

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧