[英]Getting error : The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required
I am learning Java web application. 我正在学习Java Web应用程序。 When I tried an example I am getting error
当我尝试一个例子时,我得到了错误
The type java.util.Map$Entry cannot be resolved.
无法解析类型java.util.Map $ Entry。 It is indirectly referenced from required .class files
它是从所需的.class文件间接引用的
My code: 我的代码:
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";
}
}
I am referring from : http://www.tutorialspoint.com/spring/spring_mvc_hello_world_example.htm 我指的是: http : //www.tutorialspoint.com/spring/spring_mvc_hello_world_example.htm
Please guide me to fix this issue. 请指导我解决此问题。
看来您的Eclipse IDE不支持Java8。您最好将Eclipse升级到支持Java 8的Luna
。请参阅此https://www.eclipse.org/community/eclipse_newsletter/2014/june/article1.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.