There was an unexpected error (type=Unauthorized, status=401)
程序员文章站
2022-03-03 17:17:48
...
后端捕获org.springframework.security.access.AccessDeniedException: Access is denied异常。
在Application主入口配置
@EnableAutoConfiguration(exclude = {
org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class,
org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration.class})
添加maven包
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency>
添加application-dev.properties配置文件(具体配置参考https://www.jianshu.com/p/b0b40038bb93)
security.basic.enabled=false
management.security.enabled=false
上一篇: 电脑怎么查看主板最多支持内存?
下一篇: 如何设置及清除淘宝镜像
推荐阅读
-
解决SpringBoot下delete请求不可用There was an unexpected error (type=Method Not Allowed, status=405).
-
Idea-SpringBoot:There was an unexpected error (type=Not Found, status=404). /WEB-INF/page//XX.jsp
-
thymeleaf 404报错:There was anunexpected error (type=Not Found, status=404).
-
spring boot jst 模板报404 There was an unexpected error (type=Not Found, status=404).
-
There was an unexpected error (type=Not Found, status=404)---采用layui出现的问题
-
idea:springboot整合jsp出现的错误:There was an unexpected error (type=Not Found, status=404). /WEB-INF/jsp。。
-
(发送post请求报错)There was an unexpected error (type=Forbidden, status=403). Forbidden
-
springboot中unexpected error (type=Not Found, status=404)/WEB-INF/upload.jsp和No message available解决方案
-
There was an unexpected error(type=Bad Request,status=400).Required String parameter'username' isnot
-
There was an unexpected error (type=Bad Request, status=400).以及@RequestBody和@RequestParam区别