[macrozheng/mall]mall-admin-web调用mall-admin接口登陆问题

2023-12-11 325 views
4

/admin/login 无论用什么用户名密码尝试登陆, 一直报此错误...这个是哪里没配置好吗? {"code":401,"data":"Full authentication is required to access this resource","message":"暂未登录或token已经过期"}

回答

4

后台日志报错:Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@84ce88de: Principal: anonymousUser; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@ffff8868: RemoteIpAddress: 172.17.0.1; SessionId: null; Granted Authorities: ROLE_ANONYMOUS

7

没问题的,我的是可以正常跑起来的,使用账号test, 密码123456,注意账号,密码填写的顺序,我也填错顺序了,错了几次 ![Uploading image.png…]()

8

我看了,是因为我发布的时候指定了context-path导致的, 在配置文件白名单url里修改/admin/login地址,加上配置的ctxpath就好了.....