所需类型:java.lang.String 提供:java.lang.String

问题描述 投票:0回答:1

The required and provided data types are the same i.e.,
java.lang.String then why is this error being show?

This is my project configuration.

These were the default dependencies in my project. In specifications tab only one depenedency of Servlet (5.0.0) was included.

鉴于所需和提供的数据类型相同,应该不会有任何问题。如果有人可以提供帮助,我们将不胜感激。谢谢。

maven intellij-idea jakarta-ee java-11 tomcat10
1个回答
0
投票

在 IntelliJ 中,转到

文件 -> 使缓存无效... -> 无效并重新启动

(“无效缓存”中的所有复选框均未选中,我只需单击“无效并重新启动”,它对我有用。)

IntelliJ 重新启动,问题现已解决。 ✅

© www.soinside.com 2019 - 2024. All rights reserved.