reason:
IntelliJ IDEA提示Found duplicated code in this file
It's not that our code is wrong, it's that the idea prompts that our code is duplicated, and we have the same code snippet elsewhere in the project
solve:
i>: encapsulate our code, abstract it into a method
ii>: Set the configuration of IDEA, as shown in the figure:
In this way, the Found duplicated code in this file prompt will not be reported.