Paging problem and microservice configuration feign

1 / In the microservices, the query interface is used, pageHelper is used, and the database has only 8 rows of data.

pageNum=1&pageSize=10, pageNum=2&pageSize=10, pageNum=3&pageSize=10. . . The data returned are all those 8.
Reason: This is a function that comes with pageHelper, which is called reasonable paging parameter rationalization. It is available in version 3.3.0 and above, and the default is false. When rationalization is enabled, the first page will be queried if pageNum<1, and the last page will be queried if pageNum>pages; when rationalization is disabled, empty data will be returned if pageNum<1 or pageNum>pages is disabled.

Solution: Add <property name="reasonable" value="false" /> to the general project, and in the Spring Boot project: pagehelper.reasonable=false

2. @Transactional(rollbackFor = Exception.class)
can be used for rollback in the case of complex multi-table modification and deletion of the implementation class

3. Background log feign.RetryableException: Read timed out executing POST 

It returns 9000 when it is reported for repairs, because the background call between the two microservices throws an exception and the request times out

Guess you like

Origin blog.csdn.net/qq_41358110/article/details/104928211
Recommended