Postman test data

Time:2021-4-7

1、 New

staycontrollerWrite new methods in, plus@RequestBodyNotes tojsonFormat to get data

 

 

 

 

stayPostmanThere are two ways to add data

  1. Add parameters directly, such as:

 

 

 

 

  1. withjsonFormat addition

 

 

 

 

2、 Delete

according toidDelete

 

 

 

 

3、 Modification (similar to addition)

 

 

 

 

 

 

 

 

 

 

 

4、 Find

 

 

 

 

5、 Fuzzy query:

The first fuzzy query: Select* FROM USER WHERE NAME LIKE ‘%${value}%’

 

 

 

 

 

 

 

 

The second fuzzy query: Select* FROM USER WHERE NAME like CONCAT(‘%’,#{name},’%’)

 

 

 

 

 

 

 

 

5、 Pagination

1.Add dependence

 

 

 

 

 

2.application.ymlChina and Canadapagehelper:

 

 

 

 

3.mapperLayer:UserMapper

 

 

 

 

4.serviceLayer:UserService

 

 

 

 

  1. serviceLayer:UserServiceimpl

 

 

 

 

  1. controllerLayer:

 

 

 

 

  1. UserMapper.xml

 

 

 

 

  1. Postmantest

 

 

 

Top down approach:

1staycontrollerMethod, there is no method at this timefindOne2method,Alt+enter

 

 

 

 

After return: fromcontrollerHere we areserviceLayer.

 

 

 

Go againserviceimplIn this way, we can achieveserviceNew generation method in:

 

 

 

Call againuserMapperImplementation method, at this timeuserMapperNone of themfindOne2method,Alt+enter,

 

 

 

It arrived after returningUserMapperLayer, and the method is complete.

 

 

 

FinallyUserMapper.xmlHow to write query insqlsentence.

 

Like the front-end, back-end java development can add + Qun: 609565759, there are detailed videos, materials, tutorials, documents, worth having!!! I hope we can work together, come on!!!