Week 4
Week 4
General email API on FaaS platform
Write interface document
Code inspection meeting
Modify the interface document based on the code inspection meeting
General notice API
Write interface document
Encapsulate email, zhaohu (working app), sms interfaces into a general notice API
Modify the interface document and codebased on the code inspection meeting
Test the general notice API with sample code
Document auto inspection interface
Understand how java can read word and excel files (XWPFPaagraph、XWPFTable)
Understand the interface requirements and design the interface document
Tecnical points
1. @RequestParam and @RequestBody annotations
@RequestParam annotation is used to bind request parameters to a method parameter. It is used to map request parameters to method parameters. The request parameter name must match the method parameter name.
@RequestBody annotation is used to bind the request body to a method parameter. It is used to map the request body to a method parameter. The request body can be any type of data, such as JSON, XML, or plain text.
2. Parameter of @RequestParam
- required: boolean value, default value is true. If required is true, the parameter must exist in the request. If required is false, the parameter is optional.
- defaultValue: default value of the parameter. If the parameter does not exist in the request, the defaultValue is used.
- name: parameter name. If name is not specified, the parameter name is used.
3. @Primary annotation
@Primary annotation is used to specify the primary bean. If there are multiple beans of the same type, the @Primary annotation is used to specify the primary bean.
4. @PostConstruct and @PreDestroy annotations
@PostConstruct annotation is used to execute some initialization code after the constructor is called.
@PreDestroy annotation is used to execute some cleanup code before the object is destroyed.