腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
Spring
Security
AuthenticationSuccessHandler
和
MockMvc
、
、
classes = SpringSecurityTestConfig.classpublic class ProfileMetaDataControllerTest { private MyController myController; private WebApplicationContextcontext; public void setup() { Mocki
浏览 32
提问于2019-06-20
得票数 0
回答已采纳
2
回答
Spring
Boot设置用于测试的安全性
、
、
、
public class TestControllerTest { private WebApplicationContext wac; public void setUp() {
浏览 2
提问于2014-04-28
得票数 9
回答已采纳
1
回答
Spring
无法在登录前加载css,但登录后一切正常
、
当我运行应用程序时,我的登录页面是没有图像的,但是当我登录
和
注销时,登录页面的样式应该是正确的。问题是否是安全文件或其他问题?我发现的所有答案都与
spring
根本不会加载CSS的问题有关(.antMatchers(“resources/”、"/static/“、"/css/”、"/js/“、”/映像/**“)),但我认为这不一样; import org.springframework.
security
.crypto.bcr
浏览 4
提问于2021-11-08
得票数 0
回答已采纳
2
回答
用
Spring
测试测试
Spring
安全控制器
、
、
、
、
登录jsp表单
和
spring
安全xml配置如下所示:<form action="<
security
:form-login login-page="/public/authentication/login.htm" l
浏览 1
提问于2013-12-04
得票数 4
回答已采纳
2
回答
登录属性-exchange第一次只调用一次
、
、
、
/schema/beans http://www.springframework.org/schema/
security
http://www.springframework.org/schema/
security
/
浏览 1
提问于2013-07-01
得票数 1
回答已采纳
2
回答
Spring
MVC与
Spring
Security
的集成测试
、
、
在添加
spring
security
之前,我工作得很好。我的代码是: post("j_
spring
_
security
_check")@WebAppConfiguration @ContextConfiguration(locations = {"cl
浏览 4
提问于2013-01-28
得票数 26
2
回答
多角色SecurityConfiguration
Spring
MVC +百里叶
、
、
、
、
我有两种类型的用户角色,我喜欢在登录后为每种类型的用户设置一个不同的页面,但我不知道如何才能做到这一点。 SecurityConfiguration @Configurationpublic class SecurityConfiguration extends WebSecurityConfigurerAdapter {
浏览 16
提问于2019-01-31
得票数 0
1
回答
会话过期时的部分响应
、
、
、
、
我们有一个JSF 2.0,Primefaces 5.0,
Spring
Security
3.2.3.RELEASE应用程序。为了处理会话超时,我使用primefaces对话框
和
p: idleMonitor & javascript来显示一个倒计时弹出窗口,并将它们重定向到登录页面。我非常感谢任何关于这方面的帮助
和
反馈,因为这是高度优先的。
浏览 3
提问于2015-10-09
得票数 0
1
回答
Grails修改
Spring
安全插件
、
、
我有一个web应用程序(使用Grails构建),其中我使用了
Spring
Security
和
LDAP。 登录
和
注销行为在应用程序中运行良好。
浏览 2
提问于2014-02-11
得票数 1
1
回答
通过ControllerAdvice运行时传递给
MockMvc
的身份验证令牌为空
、
、
、
、
我正在使用
Spring
1.3、
Spring
4.2
和
SpringSecurity4.0。例如,我正在使用
MockMvc
运行集成测试:MvcResult result=
mockMvc
.perform(get("/")) .etc; 在
浏览 0
提问于2015-12-11
得票数 5
回答已采纳
1
回答
为什么REST控制器正确地使用了配置好的servlet路径,但在
Security
特性中却忽略了它?
、
、
我是
Spring
的新手,我尝试使用
Spring
和
Security
创建一个安全的rest应用程序。我在找几个星期的解决办法.我在我的pom中使用容器(Tomcat)
和
Spring
父1.2.6.RELEASE。;import org.springframework.
security
.web.authenticati
浏览 1
提问于2015-10-02
得票数 1
回答已采纳
1
回答
@WebMvcTest创建名为“securityConfiguration”的bean时出错
、
、
、
、
我有一个
spring
引导rest应用程序,在这里我使用JWT进行身份验证,当我启动应用程序时,它工作得很好。我只是想添加一些测试用例,但无法解决这个问题(我使用mvn test运行测试用例: @Auto
浏览 2
提问于2020-09-05
得票数 2
回答已采纳
1
回答
在
Spring
bsic身份验证后在面孔上的getUserName
、
嗨,我可以使用下面的代码获得我的bean上的用户详细信息。但是我无法在我的页面上获得用户名。 @SessionScoped @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication auth) throws IOException,
浏览 2
提问于2014-01-07
得票数 0
2
回答
Spring
Security
with Struts2-根据用户角色重定向到不同的页面
、
spring
安全设置了存储身份验证信息的会话变量。 如果是,那么我如何在一个struts操作中访问它们。另外,如何在登录后访问用户名
和
密码
浏览 2
提问于2011-02-22
得票数 0
回答已采纳
1
回答
Spring
AbstractSecurityWebApplicationInitializer在集成测试中未启动
、
、
、
、
但我不能让它在集成测试环境中启动(或者更好地说:让
Spring
加载它)。CarPartControllerIntegrationTest { private WebApplicationContext wac; public void setUp() throws Exception {
mockMvc
= webAppContextSetup
浏览 0
提问于2015-01-03
得票数 3
1
回答
带有
MockMvc
的
Spring
springSecurityFilterChain的空响应头
、
、
、
我为
Spring
应用程序编写单元测试。这是我的
mockMvc
初始化代码:public class SpringMockFactory { private WebApplicationContextprivate FilterChainProxy springSecurityFilterChain; @Scope("prototype")resultActions
浏览 3
提问于2014-10-13
得票数 5
回答已采纳
1
回答
从
AuthenticationSuccessHandler
获取映射器
、
、
、
我正在尝试在
Spring
应用程序成功登录后返回一些用户数据。为此,我需要使用已经通过工厂在引导程序上设置的Jackson映射器序列化我的主体。 是否有方法将其注入身份验证处理程序?
浏览 3
提问于2016-02-03
得票数 0
回答已采纳
1
回答
如何用mockito测试这个类?
、
、
、
、
用户可以注册新帐户,或使用用户名
和
密码登录。我有一个叫AuthController的类。我需要测试两个方法: login/register。我想使用Mockito来测试这个类。
浏览 16
提问于2020-11-24
得票数 1
1
回答
Spring
MockMVC
、
Spring
security
和
Mockito
、
、
我想测试一个使用
Spring
security
保护的
Spring
Boot Rest控制器,并在其中使用mock。我试过使用Mockito,但我认为任何模仿工具都应该能做到这一点。为了在我的测试中启用
Spring
安全性,我首先执行了以下操作:@SpringApplicationConfiguration
和
Mocks相关的东西,所以模仿没有被注入到控制器中。
Spring
security
正在
浏览 0
提问于2015-11-04
得票数 14
回答已采纳
2
回答
Thymeleaf
Spring
安全集成sec:authorize不起作用
、
我使用的是带有
Spring
安全性的Thymeleaf模板引擎。我还使用了Thymeleaf
Spring
Security
集成模块,以便使用sec:authorize功能,但由于某些原因,它无法工作。例如,当我以员工身份登录时,我也会看到“转到领导”
和
“转到系统”按钮,但我不希望员工看到这些按钮。<?for
Spring
Boot
security
</description>
浏览 2
提问于2019-05-17
得票数 1
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Restful API是什么?该怎么设计API呢
单元测试不止Junit,会MockMvc才是高手!
SpringBoot2.x中Json基础使用详解
Java近期新闻:MicroProfile 6.0、Kotlin 1.8、Spring Framework升级
Spring Authorization Server计划2022年11月发布1.0版本
热门
标签
更多标签
云服务器
ICP备案
实时音视频
对象存储
即时通信 IM
活动推荐
运营活动
广告
关闭
领券