当前位置:网站首页>项目开发规范
项目开发规范
2022-08-02 05:41:00 【chenlu4ever】
目录
大公司总有很多流程,记录下遇到的各种规范(坑)吧~
项目中的流程
- 需求评审-用户故事、需要开需求评审会
- 编写测试用例后需要用例评审会
- 提交代码需要带用户故事或者缺陷ID实现提交代码可追溯
- 代码提交需要评审
- 写单元测试、注意代码覆盖率
- 发版需要签报、
SQL脚本规范
一、建表语句建议
- 主键为自增bigint类型,最好用表名_ID 或者ID
- 属性不允许用关键字
- 要有创建人(有意义的用户名)、创建时间、修改人、修改时间
- crated_time detetime not null default current_timestamp comment '创建时间';
- crated_by varchar(100) not null default comment '创建人';
安全问题
一、竞争条件并发
描述:可是用高并发线程绕过注册限制、注册大量同名用户。
解决方案:
(1)在程序中使用锁来控制的;
(2)在数据库中用事务和锁协同控制
(3)数据库中设置事务较高的隔离级别
以上三种各有利弊
二、文件上传校验
描述:以下校验必须都加
1、文件上传的目录权限设置为不可执行
2、文件扩展名使用白名单机制判断
3、文件最大限制
4、文件名不能包含/ 和空格
6、使用随机数改写文件名和文件路径
一般是用uuid + 时间戳的方式进行重命名,文件位置和上传人员的关系,写进数据库就好
边栏推荐
- 秒杀系统小demo
- MySql 5.7.38 download and installation tutorial, and realize the operation of MySql in Navicat
- Nacos注册中心的部署与用法详细介绍
- Ant three sides: MQ message loss, duplication, backlog problem, what are the solutions?
- APP专项测试:流量测试
- MySQL (3)
- The virtual reality real estate display system foresees the future decoration effect in advance
- MySQL Advanced - MVCC (ultra-detailed finishing)
- Kind of weird!Access the destination URL, the host can container but not
- npm does not recognize the "npm" item as the name of a cmdlet, function, script file, or runnable program.Please check the spelling of the name, and if the path is included, make sure the path is corr
猜你喜欢
MySQL 5.7 installation tutorial (full-step, nanny-level tutorial)
8/1 思维+扩展欧几里得+树上dp
Deep learning - CNN realizes the recognition of MNIST handwritten digits
MySQL driver jar package download -- nanny tutorial
Nacos客户端启动出现9848端口错误分析(非版本升级问题)
Node installation and configuration (node-v12.20.2-x64 ) and introduction to node version switching
MySql 5.7.38 download and installation tutorial, and realize the operation of MySql in Navicat
触发器简单解释
Nodejs installation tutorial
node安装和配置(node-v12.20.2-x64 ) 以及node版本切换介绍
随机推荐
NPM 安装指定版本包的方法及版本号查看
BGP+MPLS综合实验
rhce作业
Tips for programmers to write PPT
MySQL Advanced Statements (1)
APT + Transform to realize multi module Application distributed Application life cycle
Nacos database configuration
go里面的基本知识
Double for loop case (use js jiujiu printing multiplication table)
一文搞懂C操作符
DNS resolution process
MySQL classic 50 practice questions and the most detailed analysis of the whole network
秒杀系统小demo
C语言操作符详解(2)
Nacos客户端启动出现9848端口错误分析(非版本升级问题)
MySQL 5.7 安装教程(全步骤、保姆级教程)
MarkDown公式指导手册
leetcode-338.比特位计数
深入剖析成员变量和局部变量的初始化问题
Reverse resolve dns server