SOP(Simple Open Platform)
An open platform solution project, implemented based on Spring Cloud, aims to enable users to quickly build their own open platforms.
The project address
SOP provides two interface invocation modes: alipay open platform invocation mode and Taobao open platform invocation mode. After simple configuration, your project has the same interface capability as alipay open platform.
SOP encapsulates most of the functions of the open platform, including signature verification, unified exception handling, unified return content, business parameter verification (JSR-303), secret key management, etc. More functions will be implemented in the future.
Project characteristics
- The access method is simple and does not conflict with the old project, which is registered in the registry and annotated in the method.
- The architecture is loosely coupled, and the business code is implemented on their own microservices. SOP does not participate in the business implementation, which is also the benefit of Spring Cloud microservice system.
- The extension is simple, and the corresponding functions of the open platform are independent. Users can customize their own requirements, such as changing parameters and signature rules.
Who can use this project
- There are existing projects that you want to transform into open platforms for others to invoke
- There are projects out there that want to expose several of these interfaces and make them available to others through an open platform
- I want to build a new open platform project and maintain it in the way of micro-service
- Friends who are interested in open platform
SOP can be considered in all the above situations
Architecture diagram
As shown in the figure above, after the whole system is up and running, developers only need to focus on the business code in the microservice and redeploy the microservice application after the interface changes
Completed list
- Signature verification
- Unified Exception Handling
- Uniform return content
- Session management
- The secret key management
- Microserver Automatic Authentication (JSR-303)
- Support for Spring Cloud Gateway
- Admin management platform, unified management of micro-service configuration, management of route management, micro-service online and offline
- Access party management + Secret key management
- Interface Permission Assignment
- File upload/download
- SDK
- The interface current limiting
- Document integration
- Application of authorization
- Monitor log
- Support nacos
- The gateway dynamically modifies the parameters
Interface to preview
Engineering instructions
Operating environment: JDK8, Maven3, Nacos, Mysql
- Doc: Development documentation
- Sop-common: a common module that encapsulates common functions, such as signature verification, error handling, and traffic limiting
- Sop-gateway: unified access gateway, implemented by Spring Cloud Zuul, can be switched to Spring Cloud Gateway
- Sop-example: microservice example, including Springboot and SpringMVC example
- Sop-website: corresponding website of open platform, providing document API, sandbox test, etc
- Sop-auth: Application authorization service
- Sop-admin: background management
- Sop-sdk: basic SDK, including Java and C# version
- Sop-test: The interface invokes test cases
Branch instructions
- Master: the publishing branch
- Spring-cloud-gateway: The Spring Cloud gateway functions as the gateway
- Develop the daily development branch
- 1.x: Old 1.x version code
The related documents
Development of the document