clean install 出现错误 -source 1.5 中不支持 diamond 运算符

来源:互联网 发布:易通网络加速器安卓版 编辑:程序博客网 时间:2024/06/05 14:26

公司上班第一天搭建环境就出现这种错误

-source 1.5 中不支持 diamond 运算符
[ERROR] (请使用 -source 7 或更高版本以启用 diamond 运算符)

解决办法是在pom文件中添加

<!-- 插件配置 -->    <plugins>    <plugin>                  <groupId>org.apache.maven.plugins</groupId>                  <artifactId>maven-compiler-plugin</artifactId>                  <version>3.1</version>                  <configuration>                      <source>1.7</source>                      <target>1.7</target>                      <encoding>UTF-8</encoding>                  </configuration>              </plugin>             </plugins>
0 0
原创粉丝点击