部队网站建设建议,网站开发合同下载,网站认证,封面新闻是国家级媒体文章目录一、在 pom.xml 文件中加入 properties 标签二、在 maven 的配置文件设置默认的 JDK 版本三、IDE 配置参考一、在 pom.xml 文件中加入 properties 标签
我本地安装的 JDK 版本是 11#xff0c;配置如下#xff1a;
propertiesmaven.compiler.source配置如下
propertiesmaven.compiler.source11/maven.compiler.sourcemaven.compiler.target11/maven.compiler.target
/properties或者配置如下
propertiesjava.version11/java.versionmaven.compiler.source${java.version}/maven.compiler.sourcemaven.compiler.target${java.version}/maven.compiler.target
/properties二、在 maven 的配置文件设置默认的 JDK 版本
配置文件路径maven 安装目录\conf\setting.xml profileiddevelopment/idactivationjdk11/jdkactiveByDefaulttrue/activeByDefault/activationpropertiesmaven.compiler.source11/maven.compiler.sourcemaven.compiler.target11/maven.compiler.targetmaven.compiler.compilerVersion11/maven.compiler.compilerVersion/properties/profile将上面的 profile 标签写入到在 maven 的配置文件 setting.xml 中如下图中的红色部分 我本地安装的是 JDK 11所以设置为 11。
设置好之后再将 setting.xml 复制一份到 C:\Users\本地用户名\.m2 目录中
三、IDE 配置 参考
https://www.cnblogs.com/letGoGo/p/14148977.html
https://zhuanlan.zhihu.com/p/403200350
https://blog.csdn.net/Deeeelete/article/details/104382752?utm_mediumdistribute.pc_relevant.none-task-blog-baidulandingword-3spm1001.2101.3001.4242
https://www.cnblogs.com/duduwy/p/12452062.html
https://blog.csdn.net/qq_22076345/article/details/82392236