Hi, Bechir,
Maybe, you need to specify what
Java version is in your pom.xml:
For example, if you use Java 11.
Also, if you are using IntelliJ, select File -> Settings-> Build,Execution, Deployment -> Compiler -> Java Compiler. Make sure project bytecode version is set to your current version of Java, such as 11.
Select File-> Project Structure -> Project , select the right project SDK and right project language level, such as 11 in this case.
Under Platform Settings -> SDKs , make sure the right version of Java is selected.
If that still does not work, you can commit your code in github and show us.