Diamond types are not supported at language level '5'


Maven工程报Diamond types are not supported at language level '5’或Diamond types are not supported at this language level 的错误,只需要检查以下三个个地方即可:
以IDEA为例:
打开工程设置:
在这里插入图片描述
1.Project – Project language level:

 

 

 

在这里插入图片描述
2. Modules – Language level:


 

 

在这里插入图片描述


 

 



3.pom.xml

<build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

 

个人声明:此内容为引用他人并非原创(仅仅为了方便自己和他人)

引用出处:https://blog.csdn.net/dongzhensong/article/details/88799477


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM