栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Jersey REST服务上的用户身份验证

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Jersey REST服务上的用户身份验证

我成功地使用了春季安全性来保护我基于泽西岛的API。它具有可插入的身份验证方案,使您以后可以从基本身份验证切换到其他身份验证。我一般不会使用Spring,而只是使用安全性。

这是我的web.xml中的相关部分

<listener>    <listener-class>        org.springframework.web.context.ContextLoaderListener    </listener-class></listener><context-param>    <param-name>contextConfigLocation</param-name>    <param-value>        /WEB-INF/security-applicationContext.xml,        /WEB-INF/applicationContext.xml    </param-value></context-param><!-- Enables Spring Security --><filter>    <filter-name>springSecurityFilterChain</filter-name>    <filter-class>        org.springframework.web.filter.DelegatingFilterProxy    </filter-class>    <init-param>        <param-name>targetBeanName</param-name>        <param-value>springSecurityFilterChain</param-value>    </init-param></filter><filter-mapping>    <filter-name>springSecurityFilterChain</filter-name>    <url-pattern>/*</url-pattern></filter-mapping>

您可以将applicationContext.xml保留为空( )。在此处可以找到security-
applicationContext.xml的示例



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/427865.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号