2 Star 2 Fork 18

Gwentao / sss-rbac-admin

forked from CoCoTea / sra-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

当前版本V1.0.2

🍬 介绍

  • 基于SpringBoot,后端核心技术采用Sqltoy操作数据库以及Sa-Token鉴权,前端使用Vue3+TS+Element-plus。是一款前后端分离、开箱即用的后台权限管理系统。
  • 致力于打造一款不用生成冗赘代码的后台管理系统

🖥️ 在线演示

🏞️ 图片演示

🧬 软件架构

  • 前后端分离,后端采用流行的MVC三层架构,缓存Redis,数据库MySQL

🍋与其它优秀Admin的不同之处

  1. 很多优秀的Admin系统都是具备代码生成功能,一套代码生成下来的确能省很多事,但是重复性的代码有很多,所以在本项目将其抽象出一层BaseService;

v1.0.1

public interface IUserService {
    // 注释已省略......
    boolean add(UserAddParam param) throws BusinessException;

    boolean deleteBatch(List<String> idList) throws BusinessException;

    boolean update(UserUpdateParam param) throws BusinessException;

    Page<UserVO> listByPage(Page<UserVO> param) throws BusinessException;

    boolean delete(String id) throws BusinessException;
}

v1.0.2

public interface IUserService extends IBaseService<Page<UserVO>, UserPageParam, UserAddParam, UserUpdateParam> {
}
  1. 使用sqltoy框架的原因主要是不用写mybatits的mapper.java文件,因为mapper也是重复度很高,当然sqltoy还有很多优点本项目尚未用到,有待挖掘;

mybatits

public class UserServiceImpl{
    @Autowired
    private UserMapper userMapper;
    
    public List<User> getAll() {
        return userMapper.getAll();
    }
}
// + 这里还得加一个mapper
public class UserMapper{
    public List<User> getAll();
}
// mapper的xml文件......

sqltoy

public class UserServiceImpl{
    @Autowired
    private SqlToyLazyDao sqlToyLazyDao;
    
    public List<User> getAll() {
        return sqlToyLazyDao.findBySql("getAll");
    }
}
// - 这里不用再写一个mapper.java文件

// mapper的xml文件......

☘️ 启动说明

  • 步骤
  1. 运行数据库脚本
  2. 启动本地Redis并运行后端服务
  3. 安装前端依赖并运行前端项目
  • 后端
application.yml配置文件位置:src/main/resources/application.yml
数据库脚本:/doc/db/DB_SRA_V1.sql
Main入口主类:sra-bootstrap/src/main/java/com/jwss/bootstrap/SraApplicationBoot.java
  • 前端
$ cd sra-ui                         #切换到前端目录
$ npm install   || yarn             #安装依赖  
$ npm run serve || yarn serve       #开发环境  
$ npm run build || yarn build       #生产环境
  • 访问地址
  1. 后端接口文档:http://localhost:7777/doc.html
  2. 前端登录地址:http://localhost:8080/#/login
  • 备注
  1. 必须安装Redis;
  2. db_sra_v1.chnr.json文件可以用pdman编辑;

🍁 开发规范

🪐 项目结构

├─logs  ------------------------日志文件  
├─doc  -------------------------文档  
│  └─db  -----------------------数据库脚本  
├─sra-bootstrap  ---------------启动模块  
├─sra-common  ------------------常用模块  
├─sra-config  ------------------配置模块  
├─sra-framework  ---------------框架模块  
├─sra-system  ------------------系统模块  
└─sra-ui  ----------------------前端项目  

📡 核心技术栈

后端
  • SpringBoot :Spring Boot 可以轻松创建可以“直接运行”的独立的、生产级的基于 Spring 的应用程序。
  • Sqltoy :java真正最强大的ORM框架,支持市场上流行数据库。
  • Satoken :一个轻量级 Java 权限认证框架,让鉴权变得简单、优雅!
  • Hutool :小而全的Java工具类库,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。
前端
  • Vue3开发文档 :Vue 被设计为可以自底向上逐层应用。Vue 的核心库只关注视图层,不仅易于上手,还便于与第三方库或既有项目整合。
  • Element Plus :基于 Vue 3,面向设计师和开发者的组件库,简洁、美观、稳定、易用。
  • Apache ECharts :一个基于 JavaScript 的开源可视化图表库,功能非常强大。

🖥️ 软件版本要求

  • MySQL:8.0及以上
  • JDK:jdk8及以上
  • Nodejs:14.0及以上

🍫 参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
MIT License Copyright (c) 2022 CoCoTea Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于springboot,整合satoken、sqltoy的权限管理系统 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/Gwentao/sss-rbac-admin.git
git@gitee.com:Gwentao/sss-rbac-admin.git
Gwentao
sss-rbac-admin
sss-rbac-admin
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891