错误:导入项目时,项目环境与编译环境JRE版本不符

xiaoxiao2025-04-23  8

错误信息:

严重: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is java.lang.Error: Unresolved compilation problem:      '<>' operator is not allowed for source level below 1.7 ] with root cause

关键报错信息:

'<>' operator is not allowed for source level below 1.7

经过分析,可看出是JRE版本的问题,需要将环境中的JRE版本,换成要求的1.7。

这里右键 Properties

选择1.7  点击ok  即可

注:在maven聚合项目中,每个项目都需要修改。

转载请注明原文地址: https://www.6miu.com/read-5028926.html

最新回复(0)