当前位置:网站首页>项目开发规范
项目开发规范
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 + 时间戳的方式进行重命名,文件位置和上传人员的关系,写进数据库就好
边栏推荐
- 从入门到精通的MySQL数据库视频教程
- Nacos installation detailed process
- Reverse resolve dns server
- MySQL高级-MVCC(超详细整理)
- npm 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
- 有人开源全凭“为爱发电”,有人却用开源“搞到了钱”
- Practice on optimizing startup performance of VS Code
- zabbix email alarm and WeChat alarm
- Tips for programmers to write PPT
- oracle 远程连接数据库
猜你喜欢
Analysis of the source code of the JS UI framework of Hongmeng system
Node installation and environment variable configuration
Nodejs installation tutorial
mysql索引失效的常见9种原因详解
MySQL高级-MVCC(超详细整理)
Node的安装与环境变量的配置
Toolbox App 1.25 New Features at a Glance | Version Update
HCIP 第三天实验
A list of 300+ learning resources compiled by senior engineers of the Tao Department (the latest version in 2021)
MySQL(3)
随机推荐
直播系统聊天技术(八):vivo直播系统中IM消息模块的架构实践
MySQL驱动jar包的下载--保姆教程
Kingdee International: Lost in half a year and last year, how does the business model of frantically burning money continue
Node installation and configuration of environment variables
股价屡创新低 地产SaaS巨头陷入困境 明源云该如何转型自救?
Reverse resolve dns server
Nacos数据库配置
C# Coding Conventions Handbook
MySQL高阶---存储引擎、索引、锁
go里面的基本知识
MySQL Index Common Interview Questions (2022 Edition)
nodejs的安装和全局配置(超详细哦)
Common functions of pytorch
Launch Space on-premises deployment (local) Beta!
MySQL联合查询(多表查询)
MySQL - 多表查询与案例详解
flex layout (flexible layout)
Analysis of port 9848 error at startup of Nacos client (non-version upgrade problem)
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 Advanced Study Notes