idea Error:java: 无效的目标发行版: 17

Error:java: 无效的目标发行版: 17

compiler.xml

xml 复制代码
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CompilerConfiguration">
    <annotationProcessing>
      <profile name="Maven default annotation processors profile" enabled="true">
        <sourceOutputDir name="target/generated-sources/annotations" />
        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
        <outputRelativeToContentRoot value="true" />
        <module name="sharding-jdbc-examples" />
      </profile>
    </annotationProcessing>
    <bytecodeTargetLevel>
      <module name="sharding-jdbc-examples" target="17" />
    </bytecodeTargetLevel>
  </component>
  <component name="JavacSettings">
    <option name="ADDITIONAL_OPTIONS_OVERRIDE">
      <module name="sharding-jdbc-examples" options="-parameters" />
    </option>
  </component>
</project>
复制代码
<bytecodeTargetLevel>
  <module name="sharding-jdbc-examples" target="17" />
</bytecodeTargetLevel>

改成

xml 复制代码
    <bytecodeTargetLevel>
      <module name="sharding-jdbc-examples" target="8" />
    </bytecodeTargetLevel>
相关推荐
SimonKing2 分钟前
分布式日志排查太头疼?TLog 让你一眼看穿请求链路!
java·后端·程序员
消失的旧时光-194314 分钟前
Kotlin 判空写法对比与最佳实践
android·java·kotlin
小许学java17 分钟前
Spring AI快速入门以及项目的创建
java·开发语言·人工智能·后端·spring·ai编程·spring ai
一叶飘零_sweeeet37 分钟前
从 “死锁“ 到 “解耦“:重构中间服务破解 Java 循环依赖难题
java·循环依赖
whltaoin1 小时前
Java 后端与 AI 融合:技术路径、实战案例与未来趋势
java·开发语言·人工智能·编程思想·ai生态
00后程序员张1 小时前
RabbitMQ核心机制
java·大数据·分布式
用户0332126663672 小时前
将 HTML 转换为 Word:Java 自动化文档生成
java
天天摸鱼的java工程师2 小时前
Java 版 “国庆头像生成器”:8 年老开发的实用小工具
java·后端
亦良Cool2 小时前
如何部署一个Java项目
java·开发语言