腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
3
回答
Springboot
安全
hasRole
不
工作
spring-boot
、
spring-security
我无法在@PreAuthorize批注中使用
hasRole
方法。此外,request.isUserInRole(“ADMIN”)还提供了false。我遗漏了什么?
浏览 4
提问于2017-01-31
得票数 12
回答已采纳
1
回答
忽略
Springboot
安全
hasRole
java
、
spring-security
、
spring-boot
我试图保护我的spring引导应用程序(1.21)的一些urlpattern看起来像是我的antMatchers("/report**").
hasRole
("REPORT")被忽略了。authorizeRequests() .antMatchers("/report**").
hasRole
浏览 2
提问于2015-01-09
得票数 5
回答已采纳
1
回答
Appfuse弹簧
安全
hasRole
()
不
工作
java
、
spring
、
spring-security
、
appfuse
我正在尝试应用程序,我在menu.jsp中添加了一些自定义菜单(在菜单项-config.xml中不做,因为我想添加一些图标,而struts菜单不能这样做) <li>org.springframework" level="all"/>
浏览 4
提问于2015-04-01
得票数 0
回答已采纳
1
回答
Spring Security返回401表示不
安全
的URL
spring
、
spring-security
从
SpringBoot
1.3.3应用程序中使用SpringSecurity4.0.3。应用程序的REST的大多数端点都是
安全
的,使用Basic,但有些端点是不可用的,而且应该总是可用。permitAll().logoutSuccessUrl("/ui/login.html") .httpBasic(); 对
安全
端点的访问按预期
工作
当然,当不提供或有效的基本身份验证时,这些端点可以正常
工作
。
浏览 3
提问于2016-06-15
得票数 1
2
回答
如何在() Config中向单个路径匹配/路由添加多个用户角色?
java
、
spring-security
、
spring-webflux
、
spring-cloud-gateway
在spring云网关服务上执行集成测试,以测试所有路由的
安全
性是否按预期
工作
。如何向单个路径匹配/路由添加多个用户角色?使用
SpringBoot
2.1.6、Spring Finchely.SR2、Spring网关、Spring WebFlux
安全
性(反应性Spring
安全
性) .authorizeExchange() .pathMatchers(prefix + "/p
浏览 2
提问于2019-08-23
得票数 0
1
回答
从inMemoryAuthentication() -WebSecurityConfigurerAdapter提取用户名
java
、
spring-boot
、
spring-security
我与
SpringBoot
的一个学校项目
工作
,并添加了一些
安全
功能(WebSecurityConfigurerAdapter)在互联网上看到,我想知道是否有可能提取当前登录的用户的用户名,因为我需要从控制器的其他方法他的http) throws Exception { .antMatchers("/*").access("
hasRole
('USER')")
浏览 38
提问于2020-04-10
得票数 0
回答已采纳
1
回答
基于
Springboot
的JWT认证
spring
、
spring-boot
、
spring-security
、
netflix-zuul
我正在使用
SpringBoot
开发带有微服务体系结构的Rest后端。为了保护端点,我使用了JWT令牌机制。我正在使用Zuul网关。 .antMatchers("/api/dashboard/**").
hasRole
("USER") .antMatchers("/api/records/
浏览 0
提问于2018-03-20
得票数 0
回答已采纳
1
回答
springboot
安全
和weblogic交互
spring-boot
、
spring-security
、
weblogic
我有
工作
的
springboot
应用程序,使用授权声明为 protected void configure(HttpSecurity http) throws Exception {IIUC
springboot
2不会在weblogic12.1.x上启动(至少我不知道如何启动),并且由于weblogic错误,spring
安全
性被忽略,一切都是允许的。如果我没看错的话,
springboot
2确实是在12.2.X上启动的,但是(由于weblogic bug?)忽略spring
安全
性,并
浏览 18
提问于2018-12-21
得票数 0
回答已采纳
1
回答
飞行前浏览器请求中的CORS问题
spring-boot
、
cors
、
preflight
、
cross-origin-read-blocking
我的API是在
Springboot
中设置的,我已经尝试了以下几种方法: 在类和方法级别设置了@交叉原产地(=“*”)注释。还启用了GET,POST,交叉原点的选项,以及允许所有标题。但是如果我发送其中一个标头,它就能
工作
。在选项请求期间,如果有一个名为原产地的请求头,则请求将失败。如果我从邮递员那里删除原点,它就能
工作
了。
浏览 1
提问于2020-06-11
得票数 0
1
回答
自定义登录JSP页面
Springboot
+ SpringSecurity
spring
、
spring-boot
、
spring-mvc
、
spring-security
我是
springboot
的新手,我正在尝试实现一个自定义登录。它不
工作
,它总是显示默认的spring
安全
登录。有什么帮助吗?我一直在寻找解决方案,但我找不到任何适合我的项目的东西。求求你,你知道吗?antMatchers("/employees/save*").hasAnyRole("MANAGER", "ADMIN") .antMatchers("/employees/delete").
h
浏览 0
提问于2020-04-12
得票数 0
1
回答
thymeleaf.extras.springsecurity4 sec:授权不起作用
java
、
spring-security
、
thymeleaf
嗨,我正在从事
springboot
项目,我将thymeleaf.extras.springsecurity4添加到了我的项目中。实际上它已经
工作
了很长时间,但知道它不是正常
工作
部分是sec:authorize=“
hasRole
(‘working.not’)”代码,如下所示 <p>Kontrol
hasRole
('NORMAL')">I am here</p> <p
浏览 5
提问于2015-08-23
得票数 0
1
回答
SpringBoot
2.0.M4破坏了application.yml中的http
spring-boot
、
spring-security
SpringBoot
1.5.6. respected尊重下面application.yml中指定的基本用户名和密码。我在release /doc中看到了一些特定于简化执行器
安全
性的更改--启用/禁用。我没看到任何与此有关的细节。 user: password: example_password 我已经确认这个功能是从
SpringBoot
2.0.0
浏览 2
提问于2017-10-25
得票数 2
回答已采纳
3
回答
Thymeleaf 3.0 Spring +
安全
集成不起作用
java
、
spring-boot
、
spring-security
、
thymeleaf
在基于Spring 1.4.3的项目中,我很难让Thymeleaf与Security一起
工作
。 例如,标签。
浏览 18
提问于2016-12-29
得票数 6
回答已采纳
1
回答
使用Security链编程从应用程序内部验证用户授权
spring-security
、
spring-hateoas
我目前正在用
SpringBoot
1.4.2.RELEASE和SpringSecurity4.1.3.RELEASE开发一个应用程序,这个应用程序有Rest控制器,接收和响应json消息。使用的配置如下: .antMatchers(HttpMethod.POST, "/foo/bar/**") .access("(
hasRole
('OPERATOR') &&
hasRole
(
浏览 4
提问于2016-12-14
得票数 1
回答已采纳
1
回答
升级spring & java版本后无法从bitbucket中读取PCF中的app配置
spring-boot
、
cloud-foundry
、
spring-web
、
java-11
关键的Spring服务不适用于Java 11和spring引导2.1.1.1.RELEASE和spring : 5.1.3.RELEASE。我收到了“请求访问令牌错误”。有解决这个问题的指示吗?
浏览 0
提问于2019-01-07
得票数 0
回答已采纳
1
回答
IP地址与authorizeHttpRequests的匹配
java
、
spring
、
spring-security
mvcMatchers("/resources/**", "/signup", "/about").permitAll() .mvcMatchers("/db/**").a
浏览 9
提问于2022-05-24
得票数 0
回答已采纳
1
回答
正在获取客户端注册的令牌响应中缺少(必需) ID令牌的[invalid_id_token]:github
spring-boot
、
oauth-2.0
我正在使用
SpringBoot
和Oauth2在我的应用程序上进行身份验证,目前使用github。如果我在application.properties上使用作用域oidc,则该过程
工作
正常,并使用github进行登录。@Configurationpublic class SecurityConfig extends WebSecurityConfigurerAdapter(HttpSecurity htt
浏览 66
提问于2019-11-19
得票数 1
2
回答
Spring身份验证处理ajax请求和默认登录页
java
、
ajax
、
spring
、
spring-security
所以,我过着spring
安全
java配置梦想(?)放弃了xml,所有的
工作
都很顺利--除了;例: protected void configure(HttpSecurity http) throws')") .antMatchers("/user/**").access("
hasRole
('ADMIN') or
hasRole
('USER'
浏览 6
提问于2016-06-05
得票数 0
回答已采纳
3
回答
Spring
安全
性、尾斜杠和URL中的点
java
、
spring
、
spring-mvc
、
spring-security
我有以下Spring
安全
配置: <http-basic /> <intercept-url pattern=&quo
浏览 0
提问于2013-12-15
得票数 19
回答已采纳
1
回答
不需要表单登录的Spring
安全
性
java
、
spring
、
rest
、
spring-security
我在我的应用程序Spring控制器中实现了Spring
安全
表达式:@RequestMapping("init") @RequestMapping(value = "/", method = RequestMethod.GET),会显示默认的Spring登录表单(http://loca
浏览 3
提问于2012-08-16
得票数 6
回答已采纳
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
使用SpringSecurity让SpringBoot1.x项目更安全
Vlidation数据合法性校验
shiro
Shiro的原理及Web搭建
大型网站系统架构图
热门
标签
更多标签
活动推荐
运营活动
广告
关闭
领券