代码拉取完成,页面将自动刷新
lg-soar是一套全部开源的快速高性能的开发平台,推崇默认为主兼顾扩展个性化配置,具有简单易用不失灵活的特性,具有微服务与单体无缝切换,同一套代码既可以部署成微服务也可以部署成单体、多租户、多数据源、多规则IP白名单拦截、好用的前端查询器、自动签名验签 、自动数据脱敏、敏感数据加密、枚举字典翻译、分布式锁、统一异常处理、统一响应数据格式、丰富的开发工具、redis + caffeine + spring cache的缓存实现 、可插拔的redis支持等丰富的功能,毫无保留给个人及企业免费使用。https://gitee.com/lgx1992/lg-soar
server // 后端服务
├── soar-base // soar 基础模块(共享)
│ └── soar-common // soar 基础包(工具、枚举、常量)
│ └── soar-core // soar 核心功能模块
│ └── soar-database // soar 数据库访问模块
│ └── soar-redis // soar redis功能模块
│ └── soar-spring-mvc // soar spring-mvc模块()
├── soar-api // 功能模块对外开放的api定义(共享)
│ └── soar-system-api // system 对外开放的api
│ └── soar-general-api // general 对外开放的api
│ └── soar-message-api // message 对外开放的api
├── soar-modules // soar 服务功能模块(共享)
│ └── soar-system // system 系统业务模块(用户、组织职位、角色、权限、菜单、登录、登出、字典、日志等)
│ └── soar-general // general 通用服务模块,文件、地区、网站元素
│ └── soar-message // message 信息通信模块,消息、邮件、websocket、消息模板、公告、通知、提醒
│
├── soar-feign // api 的 feign 模块(只需要单体时可删除该模块)
│ └── soar-system-feign // system-api 的 feign实现
│ └── soar-general-feign // general-api 的 feign实现
│ └── soar-message-feign // message-api 的 feign实现
├── soar-cloud // soar 微服务实现模块(只需要单体时可删除该模块)
│ ├── soar-cloud-core // 微服务核心,提供微服务公共实现(异常处理、当前用户)
│ ├── soar-gateway-cloud // [9000] 微服务网关
│ ├── soar-system-cloud // [9001] system 的微服务启动入口
│ ├── soar-general-cloud // [9002] general 的微服务启动入口
│ └── soar-message-cloud // [9003] message 的微服务启动入口
│
└── demo-boot // [9000] 单体版 demo(你的业务代码写在这里 或 参考这里创建自己的业务模块)
└── demo-cloud // [9004] 微服务版 demo(你的业务代码写在这里 或 参考这里创建自己的业务模块)
@Log:实现简单操作日志功能,并使用线程池保存异步保存操作日志不影响业务功能
@ClusterLock:实现分布式锁功能,key支持el表达式
@ClusterFairLock:分布式公平锁
@ClusterReadLock:分布式读锁
@ClusterWriteLock:分布式写锁
@IdempotentByParam:通过请求数据信息摘要的方式实现接口幂等性校验功能
@IdempotentByToken:通过后端生成唯一key的方式实现接口幂等性
@IdempotentByKey:通过前端生成唯一key的方式实现接口幂等性
@DictDefine:在实现 IDict 接口的枚举类加上该注解,可通过扫描生成指定字典信息
@SignatureVerification 接口验签
@SignatureIssue 接口数据签名
@SignContain 数据签名包含字段
@SignExclude 数据签名排除字段
@Translate 用于字段和方法:翻译、绑定数据,用于自定义注解:绑定翻译处理器
@TranslateByEnum 字段翻译注解,根据枚举翻译
@TranslateByString 字段翻译注解,根据字符串翻译
@TranslateByDict 字段翻译注解,根据数据字典翻译
@TranslateByEntity 字段翻译注解,根据实体类翻译
@TranslateName 自定义翻译后的字段名,默认目标字段名+Name
@Desensitization:字段脱敏注解,用于配置字段脱敏方式
@NumberSerialize 数值序列化(基于 java.text.NumberFormat)
@DecimalSerialize 小数序列化(基于 java.text.DecimalFormat)
@SoarFormat json格式化,
日期时间:@SoarFormat("yyyy-MM-dd HH:mm:ss")、@SoarFormat("yyyy-MM-dd")
数值:@SoarFormat(",##0.00")、@SoarFormat(",##0吨")、@SoarFormat("#.##%")
脱敏:@SoarFormat("$TM:3****4")、@SoarFormat("$TM:1*1")、@SoarFormat("$TM:3···4")
自定义替换:@SoarFormat({"<", "<"})、@SoarFormat({"<", "<", ">", ">"})
@BankCard 验证银行卡
@Chinese 验证中文
@ContactPhone 验证联系方式(固话和手机)
@Distinct 验证数据是否重复(前端数组元素是否唯一)
@Enum 验证提供数据是否符合枚举值
@FixedPhone 验证固话
@IdCard 验证身份证号码
@IP 验证IP地址
@License 验证营业执照号
@MobilePhone 验证手机号
@Id 验证数值id是否有效
@CountMapping 相当于@RequestMapping(path = "count", method = RequestMethod.GET, name = "统计")
@CreateMapping 相当于@RequestMapping(path = "create", method = RequestMethod.POST, name = "创建")
@DetailMapping 相当于@RequestMapping(path = "detail", method = RequestMethod.GET, name = "详情")
@ExistMapping 相当于@RequestMapping(path = "exist", method = RequestMethod.GET, name = "是否存在")
@ExportMapping 相当于@RequestMapping(path = "export", method = RequestMethod.GET, name = "导出")
@ImportMapping 相当于@RequestMapping(path = "import", method = RequestMethod.POST, name = "导入")
@QueryMapping 相当于@RequestMapping(path = "query", method = RequestMethod.GET, name = "查询")
@RemoveMapping 相当于@RequestMapping(path = "remove", method = RequestMethod.POST, name = "删除")
@UpdateDisabledMapping 相当于@RequestMapping(path = "updateDisabled", method = RequestMethod.POST, name = "启/禁用")
@UpdateMapping 相当于@RequestMapping(path = "update", method = RequestMethod.POST, name = "更新")
@UpdateSortMapping 相当于@RequestMapping(path = "updateSort", method = RequestMethod.POST, name = "修改排序")
@ResourceScanIgnore 系统扫描路径生成权限时忽略,放在类上忽略类内的所有接口,放在方法上忽略当前方法接口
@SoarQueryIgnore 放在实体属性上,在SoarQuery构造查询条件时忽略该属性
@SoarQueryField 放在实体属性上,可控制SoarQuery构造查询条件时的行为
SignatureData 数据签名工具
SpringUtils 用于非Spring bean 类获取 spring bean
DatetimeUtil 时间工具(格式化、格式解析、时间戳生成)
AssertUtil 断言工具
ClassUtils 类扫描工具
DesensitizationUtil 脱敏工具
SignatureUtils 数据签名工具(签名、验签)
TranslateUtils 字段翻译工具
SpelExpressionUtils spring el表达式支持工具
DictEnumUtils
ExceptionUtil 异常格式工具
FileUtil 文件工具
IpUtil IP工具
ParameterUtil 参数验证工具(类似断言工具)
PojoUtil 类复制转换工具
ReflectUtil 反射工具
SerializeUtil 序列化工具
Validator 验证器(校验数据)
DataUtil 数据工具(base64、hex)
NumberUtil 数值工具
RandomUtil 随机数工具(随机int、随机long、随机字符串等)
StringUtil 字符串工具
SystemUtils 系统工具(内存、硬盘、jvm信息)
PathMatcher 路径匹配器
JacksonUtil json工具(对jackson进行封装)
AESUtil 对称加密工具
CRCUtil crc算法工具
CryptoUtils hash加密工具(信息摘要算法工具)
RSAUtils 非对称加密工具
ExcelUtil Excel导出导入工具,基于阿里EasyExcel
SoarQueryUtil 查询条件组装工具
SoarJWT 自定义jwt实现,具有更简短更快速的特性
Soar64 类似base64,需要压缩数据存储传输时使用,比如redis key
TreeData 树形数据接口
BitSet 位数据set,jdk有类似实现,本实现基于byte,jdk实现基于long,空间利用率比jdk实现高,性能比jdk实现差
TwoBitSet 双数据set,类似BitSet,但支持四种状态
CurrentUser:当前登录用户
DynamicJsonTypeHandler 动态json类型数据处理器,数据类型不固定的
AutoJsonTypeHandler 自动json类型数据处理器(类型固定的)
AbstractAesHandler Aes对称加密类型处理器(抽象类)
IntegerAesHandler int类型数据对称加密处理器
LongAesHandler long类型数据对称加密处理器
StringAesHandler 字符串类型数据对称加密处理器
TranslateConverter 翻译处理转换器需配合翻译注解实现导入导出翻译功能(@Translate系列)
BooleanConverter 布尔类型转换器
BaseAException 用户异常基础异常类,异常码A开头,表示用户操作或数据不合法等用户原因产生的异常,用户可通过调整操作自行解决
BaseBException 系统异常基础异常类,异常码B开头,表示系统内部问题,表示系统编码不够完善产生的异常,用户无法解决
BaseCException 第三方异常基础异常类,异常码C开头,表示调用第三方服务时出现异常,用户无法解决
AuthenticationException 未登录异常(用户异常)
PermissionException 无权限异常(用户异常)
ParameterException 参数不正确异常(用户异常)
AlgorithmException 加密工具产生的异常(系统异常)
yarn install
或者
npm install
yarn run serve
或者
npm run serve
server {
listen 80;
server_name 你的域名;
rewrite ^(.*) https://$server_name$1 permanent;
}
server {
listen 443 ssl;
server_name 你的域名;
# ssl
# 改成你的证书的名字
ssl_certificate 你的域名证书.pem文件;
# 你的证书的名字
ssl_certificate_key 你的域名证书.key文件;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
#charset koi8-r;
# 访问日志
#access_log logs/host.access.log main;
# 前端配置
location / {
root /www/apps/szsw/dist/; # 前端根目录
try_files $uri $uri/ /index.html last;
index index.html;
}
# 接口配置
location ^~ /soar-api {
proxy_pass http://localhost:9001/; # 你的后端服务
# 请求头设置
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr; #获取客户端真实IP
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 附件配置(通过nginx直接访问文件)
location /file-root {
root /www/apps/szsw/upload; # 文件上传根目录
rewrite "^\/file-root(.*)$" $1 break;
try_files $uri @file-root; # 文件未找到的通过后端服务访问
expires 7d;
}
# 未发现附件则匹配以下规则(通过后端服务访问文件)
location @file-root {
proxy_pass http://localhost:9001/file/preview?path=/file-root$uri;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
gzip on;
}
友情链接:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。