idea jdk 已经配置成了1.8,还提示Diamond ty

2020-12-29  本文已影响0人  小码A梦

需要配置pom.xml文件配置java编译环境

<build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

参考:
https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html

上一篇下一篇

猜你喜欢

热点阅读