Spring Security (三):与Vue.js整合

2023-07-04 15:30:00 security spring 整合 Vue js

文章回顾:

本篇内容较长,先看下效果:


然后侧边栏的路由其实根据我们后台获取到的:(这个数据结构比较简单,在这里只是演示)


{
"code": 200,
"msg": "",
"data": {
    "id": "1",
    "username": "admin",
    "roles": [
        {
            "id": 1,
            "describe": null,
            "rolename": "ROLE_ADMIN",
            "permissions": null
        }
    ],
    "menus": [
        {
            "per_id": 1101,
            "per_paerent_id": 0,
            "per_name": "权限管理",
            "per_resource": "auth",
            "children": [
                {
                    "per_id": 1102,
                    "per_paerent_id": 1101,
                    "per_name": "角色管理",
                    "per_resource": "role",
                    "children": null
                },
                {
                    "per_id": 1103,
                    "per_paerent_id": 1101,
                    "per_name": "资源管理",
                    "per_resource": "per",
                    "children": null
                }
            ]
        }
      ]
    }
}

相关文章