There are many great answers here. If you imported your maven project from spring initializr, make sure the project is set to your your java version. In my case Java 16.
Goto File > Project Structure > Modules
Select the project folder, next change the Language level to your Java version, apply and click OK.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There are many great answers here. If you imported your maven project from spring initializr, make sure the project is set to your your java version. In my case Java 16.
Goto File > Project Structure > Modules
Select the project folder, next change the Language level to your Java version, apply and click OK.