You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users with role admin automatically get all permissions from system_permission table, regardless of role-permission mappings. Adding a new permission to system_permission is immediately available to all admin users — zero maintenance.
API Reference
Auth (/auth/**)
Method
Path
Auth
Description
POST
/auth/login
-
Login, returns token
POST
/auth/register
-
Register new user (auto-assigns role_id=4)
PUT
/auth/password
Token
Change password (clears token, forces re-login)
POST
/auth/deactivateAccount
Token
Deactivate account (logical delete + logout)
GET
/auth/logout
-
Logout (clear token)
GET
/auth/info
Token
Get user info + permissions + roles
GET
/auth/me
Token
Get current user ID
GET
/auth/tokenInfo
Token
Get token metadata
GET
/auth/isLogin
-
Check login status
Menu (/menu/**)
Method
Path
Permission
Description
GET
/menu/nav
Login only
Navigation sidebar (filtered by user permissions)
GET
/menu
system:menu:query
Paged query
GET
/menu/{id}
system:menu:query
Get by ID
GET
/menu/all
system:menu:query
List all
POST
/menu
system:menu:create
Create
PUT
/menu/{id}
system:menu:update
Update
DELETE
/menu/{id}
system:menu:delete
Delete
Role (/role/**)
Method
Path
Permission
Description
GET
/role
system:role:query
Paged query
GET
/role/{id}
system:role:query
Get by ID
POST
/role
system:role:create
Create
PUT
/role/{id}
system:role:update
Update
DELETE
/role/{id}
system:role:delete
Delete
User (/user/**)
Method
Path
Permission
Description
GET
/user
system:user:query
Paged query
GET
/user/{id}
system:user:query
Get by ID
POST
/user
system:user:create
Create
PUT
/user/{id}
system:user:update
Update
DELETE
/user/{id}
system:user:delete
Delete
Testing
# Login as admin
curl -X POST http://localhost:8000/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"admin123"}'# Response: {"code":200,"data":"xxxx-xxxx-xxx","msg":"success"}# Get user info + permissions
curl http://localhost:8000/auth/info \
-H "token: xxxx-xxxx-xxx"# Query menus (requires system:menu:query)
curl http://localhost:8000/menu?page=1&size=10 \
-H "token: xxxx-xxxx-xxx"# Navigation menu (no permission required)
curl http://localhost:8000/menu/nav \
-H "token: xxxx-xxxx-xxx"
Profiles
The project supports multiple environments through Spring Boot profiles:
The container connects to MySQL and Redis on your host machine via host.docker.internal
If Docker Hub is unreachable (common in China), configure a registry mirror in Docker Desktop:
Settings → Docker Engine → add registry-mirrors, then Apply & Restart
About
A Spring Boot 4.1.0 backend project with RBAC permission management, built with MyBatis-Plus, Sa-Token, and Redis.