错误信息:
严重: 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聚合项目中,每个项目都需要修改。
本文详细解析了Java泛型编译错误“'<>' operator is not allowed for source level below 1.7”的原因,指出这是由于JRE版本过低导致,并提供了具体的解决方案,包括如何在项目中正确配置JRE版本。
699

被折叠的 条评论
为什么被折叠?



