在Spring4.0.3中,什么是AuthenticationException.getAuthenticat
发布时间:2020-12-15 01:30:04 所属栏目:大数据 来源:网络整理
导读:我在我的项目中使用Spring 3,现在升级到Spring 4.0.3.RELEASE. 现在使用AuthenticationException.getAuthentication()时,它表示已弃用,但无法找到替代方案.这是代码: public ModelAndView init(HttpServletRequest request,HttpServletResponse response) {
我在我的项目中使用Spring 3,现在升级到Spring 4.0.3.RELEASE.
此外,不推荐使用方法setAuthentication(authentication). 最佳答案
没有替代品,因为这种方法存在安全风险.
3.x版本的latest Javadoc说:
任何依赖于此的代码都需要重新思考. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |