Vấn đề này là do các trình viết code nhứ Esclipse hay InteljJ nó dùng java jdk 1.5 mặc định. Do vậy muốn chuyển qua sử dụng Java 8 hoặc các version khác bạn có thể sử dụng `Maven Complier Plugin` của maven để làm được việc này.
Ví dụ bạn cần sử dụng Java 8 để viết code bạn có thể thêm đoạn code dưới đây vào pom.xml file:
Code: Select all
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>