
若依框架跳过身份校验,用postman测试后端接口
将sys_config表里的验证码开关设为false。
·
1. 关闭登录验证码
将sys_config表里的验证码开关设为false。
2. 运行项目,获取cookie和Authorization
键盘F12打开网络请求,在请求头header里面找到cookie和Authorization,ctrl+C复制。
3. 打开postman,粘贴到headers
即可直接测试后端端口
4. 问题:权限404
修改后端配置:\ruoyi\framework\config\SecurityConfig.java
protected SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception
{
...
// 可匿名访问,无需鉴权
.antMatchers("/**").permitAll();
...
}
更多推荐
所有评论(0)