文章目录 一、前期配置 1. 加入依赖 2. 数据库脚本 二、定义实体类 1. 定义 User 2. 定义 Role 三、定义 Service 四、定义 Mapper 1. UserMapper 2. UserMapper.xml 五、定义 SecurityConfig 一、前期配置 1. 加入依赖 <dependency> <groupId>com.alibaba</groupId>