1.SAM end API interface
Fixed Account online account authentication module
Reference profile configuration template project calls Relations
1.1API specification
API request address specification:
The use of 26 lowercase letters in English, using the "_" connection between English words.
Example: GET Request
API parameters and Request Return parameter specification:
Ø are transmitted using Json Object Format
Ø hump method using field names.
Ø field is named with the correct English words, and try to express the meaning of this field is correct.
Example: new network request, POST request (note the red field values are hump method)
2. API development
2.1 Rest implement (Web)
2.1.1 Spring-cxf.xml configuration
url is determined according to the interface module for the Fixed Account, so that the interface in the sam-macc
Wherein address = "/ macc" indicates that the server address path
2.1.2 AccountRest class implementation
2.1.3 Spring-Dubbo.xml configuration
Call common.dubbo.provider defined good way to pass data over from the SAM
2.2 AccountService class implements (Service)
2.2.1 Packaging BeanPo
For FixedAccount entity bean SAM does not require the filter to the properties of
2.2.2 AccountService class implementation
2.1.2 facilitate business logic Rest call, returns a response
2.3 common module defining services (DAO)
2.3.1 define service interfaces
Dubbo distributed principle to provide services
2.3.2 Data Register Service xml configuration
2.3.3 implement 2.21provider interface services
2.3.4 New Dao operating in sql
3.API test
Use Postman test, install software on their own Baidu
After opening the Postman can import the following links:
https://www.getpostman.com/collections/065a4e6acc8c04e43fbe
Note: additions and modifications should be added to submit the form FixAccountPo objects
3.1 Queries
3.2 increase
Require synchronization account, you can add