1. Modify global settings
Modify project -> Project Language Level-> Select a level lower than the current JDK version
2. Modify model settings
model-> Select model -> Language-> Select a level lower than the current JDK version
3. Modify setting
Compiler, java compiler version