简体   繁体   English

出现错误:无法解析类型java.util.Map $ Entry。 从要求中间接引用

[英]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.

相关问题 “无法解析类型java.util.Map $ Entry。 它是从所需的.class文件间接引用的“ - “The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files” 无法为JSP编译类:无法解析类型java.util.Map $ Entry。它是从所需的.class文件间接引用的 - Unable to compile class for JSP: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files Java 1.8.0_60和Tomcat 7.5.4:无法解析类型java.util.Map $ Entry。 从所需的.class文件间接引用它 - Java 1.8.0_60 and Tomcat 7.5.4: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files 得到错误无法解析类型java.util.Map $ Entry - Getting Error The type java.util.Map$Entry cannot be resolved 无法解析java.rmi.RemoteException类型。 它是从java中所需的.class文件错误中间接引用的 - The type java.rmi.RemoteException cannot be resolved. It is indirectly referenced from required .class files error in java 获得以下构建错误:“类型{---}无法解析。 它是从所需的.class文件间接引用的“ - Getting the following build error: “the type {---} cannot be resolved. it is indirectly referenced from required .class files” 无法解析java.io.ObjectInputStream类型。它是从所需的.class文件间接引用的 - The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files Eclipse中的错误(适用于Android):无法解析java.lang.String类型。它是从所需的.class文件间接引用的 - Error in Eclipse (for Android): The type java.lang.String cannot be resolved. It is indirectly referenced from required .class files JAVA EMAIL API 错误(无法解析类型 javax.mail.Authenticator。它是从所需的 .class 文件间接引用的) - ERROR ON JAVA EMAIL API(The type javax.mail.Authenticator cannot be resolved. It is indirectly referenced from required .class files) Android:无法解析java.awt.Image类型。 它是从所需的.class文件间接引用的 - Android: The type java.awt.Image cannot be resolved. It is indirectly referenced from required .class files
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM