建设目标
平台接口建设规范旨在界定接口开发、测试和使用的框架边界,定义技术目标和要求,并提供完整的接口文档,为自有平台和第三方平台提供数据和服务支持。
[En]
The platform interface construction specification aims to delimit a framework boundary for interface development, testing and use, define technical objectives and requirements, and provide complete interface documentation to provide data and service support for self owned platforms and third-party platforms.
建设标准
接口规范
命名规范
在标准的RESTful架构中,每个网址代表一种资源(resource),所以网址中不能有动词,只能有名词。
据观察,大多数平台在接口设计中不能完全遵循该规范。我的建议是,接口命名和参数命名必须基于业务和理解需求进行合理设计,以确保简单、实用和易于理解。
[En]
It is observed that most platforms cannot fully follow this specification in interface design. My suggestion here is that both interface naming and parameter naming must be reasonably designed based on business and understanding needs to ensure simplicity, pragmatism and ease of understanding.
幂等性
Idempotency意味着任何多个请求的执行结果与一个请求的结果具有相同的影响。无论查询多少次,查询操作都不会影响数据本身,因此查询操作本身是幂等的。但是,每次执行新操作时,数据库都会更改,因此它是非幂等的。
[En]
Idempotency means that the execution result of any multiple requests has the same impact as the execution result of one request. No matter how many times you query, the query operation will not affect the data itself, so the query operation itself is idempotent. However, the database will change every time the new operation is executed, so it is non idempotent.
关于幂等性的实现方式有很多种,比如前端禁用、参数传入唯一Key值或者先查询后操作等,这里不做详细概述。一般来说接口中新增操作、部分带条件的删除和修改操作都是要考虑幂等性的,这也是保证数据一致性和安全性的必要措施。

RabbitMQ 工作队列

免申请直接用上 IDEA 新 UI,只需要这三步配置

Metro 界面设计案例

Hexo 必装插件

15分钟学会JWT使用

CodeSmith Template Model Output

JVM-垃圾回收机制

Jenkins 强制停止 job 执行

MVCC(多版本并发控制)详解

Spider

Redis的Java客户端

Java 并发编程

mybatis批量操作

Java 线程创建与常用方法
