当前位置:网站首页>项目开发规范
项目开发规范
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 Advanced Statements (1)
- HCIP 第三天实验
- MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql
- selenium + robotframework的运行原理
- nacos安装配置和单机部署教程
- Practice on optimizing startup performance of VS Code
- How to install the specified version package with NPM and view the version number
- Nodejs安装教程
- BGP+MPLS综合实验
- Leading the demand and justifying the HR value - the successful launch of the "Human Resource Leading Model HRLM"
猜你喜欢

aTrust项目的相关操作与分享

Guarantee WIFI security in home and enterprise-with AC and AP networking experiment

Tips for programmers to write PPT

Ant three sides: MQ message loss, duplication, backlog problem, what are the solutions?

反向解析dns服务器

MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql

Write implicit join on view with jOOQ 3.14 synthetic foreign key

Toolbox App 1.25 新功能一览 | 版本更新

SphereEx苗立尧:云原生架构下的Database Mesh研发实践

Nacos客户端启动出现9848端口错误分析(非版本升级问题)
随机推荐
HCIP第十七天
MySQL union query (multi-table query)
Tips for programmers to write PPT
引领需求 为HR价值正名——“人力资源领先模型HRLM”成功首发
Kind of weird!Access the destination URL, the host can container but not
flex layout (flexible layout)
Nodejs installation and global configuration (super detailed)
Machine learning -- - theory of support vector machine (SVM)
love
A detailed introduction to the deployment and usage of the Nacos registry
Nacos安装详细过程
MySQL 23道经典面试吊打面试官
Guarantee WIFI security in home and enterprise-with AC and AP networking experiment
MySQL 23 classic interviews hang the interviewer
Common functions of pytorch
MySQL - Multi-table query and case detailed explanation
C# Coding Conventions Handbook
Nodejs installation tutorial
MySql 5.7.38下载安装教程 ,并实现在Navicat操作MySql
C# 编码规范手册