首页 > 编程语言 > 详细

spring-security中的 No AuthenticationEntryPoint could be established异常处理.

时间:2020-05-04 12:33:21      阅读:82      评论:0      收藏:0      [点我收藏+]

异常:

严重: Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: No AuthenticationEntryPoint could be established. Please make sure you have a login mechanism configured through the namespace (such as form-login) or specify a custom AuthenticationEntryPoint with the ‘entry-point-ref‘ attribute 
Offending resource: class path resource [spring-security.xml]

文本翻译:

配置问题:无法建立AuthenticationEntryPoint。请确保通过命名空间配置了登录机制(例如表单登录),或使用“entry point ref”属性指定自定义AuthenticationEntryPoint

违规资源:类路径资源[spring security.xml]

处理方法:

由于疏忽在spring-security.xml文件中忘了加

 <form-login/> <!-- 页面拦截,开启表单登录功能—->

加上就好了

    <http use-expressions="false">
        <intercept-url pattern="/**" access="ROLE_USER" />
         <!-- 页面拦截,开启表单登录功能 -->
        <form-login /> 
    </http>

 



spring-security中的 No AuthenticationEntryPoint could be established异常处理.

原文:https://www.cnblogs.com/tiamocjh/p/12825899.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!