【问题标题】:Getting error : The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required出现错误:无法解析 java.util.Map$Entry 类型。它是从 required 中间接引用的
【发布时间】:2016-02-17 05:30:26
【问题描述】:

我正在学习 Java Web 应用程序。当我尝试一个示例时,我收到了错误

类型 java.util.Map$Entry 无法解析。它是从所需的 .class 文件中间接引用的

我的代码:

package com.tutorialspoint;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.ui.ModelMap;

@Controller
@RequestMapping("/hello")
public class HelloController {

@RequestMapping(method = RequestMethod.GET)
public String printHello(ModelMap model){
    model.addAttribute("message", "Hello Spring MVC Framework!");
    return "hello";
}
}

我指的是:http://www.tutorialspoint.com/spring/spring_mvc_hello_world_example.htm

请指导我解决此问题。

【问题讨论】:

标签: java spring jsp


【解决方案1】:

您的 Eclipse IDE 似乎不支持 Java 8。您最好将您的 Eclipse 升级到支持 Java 8 的Luna。请参考此https://www.eclipse.org/community/eclipse_newsletter/2014/june/article1.php

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-29
    • 2013-10-15
    • 1970-01-01
    • 1970-01-01
    • 2014-07-12
    相关资源
    最近更新 更多