我使用 SpringSource Tool Suite sts 来启动一个关于 MVC 的 hello world 示例。
File -> New -> Spring Template Project -> 然后选择 Spring MVC Project
我添加 Project Name:helloworld
并将顶级包指定为com.helloworld.myapp
然后完成。
现在我尝试运行应用程序并选择在服务器上运行,它总是向我显示永久屏幕,上面写着:请求的资源 ( /helloworld/
) 不可用。
服务器显示以下内容:
Nov 30, 2011 4:06:53 PM com.springsource.tcserver.security.PropertyDecoder <init> INFO: tc
从 D:\springsource\vfabric-tc-server-developer-2.6.1.RELEASE\spring-insight-instance\conf\Catalina\localhost 部署配置描述符 EchoSpringMVC.xml 2011 年 11 月 30 日下午 4:07:56 org.apache .catalina.startup.SetContextPropertiesRule 开始警告:[SetContextPropertiesRule]{Context} 将属性“源”设置为“org.eclipse.jst.jee.server:EchoSpringMVC”没有找到匹配的属性。2011 年 11 月 30 日下午 4:07:56 com.springsource.insight.collection.tcserver.ltw.TomcatWeavingInsightClassLoader 启动信息:上下文 [localhost|EchoSpringMVC] 将不会被编织 2011 年 11 月 30 日下午 4:07:56 org.apache。 catalina.core.StandardContext listenerStart 严重:向类 org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError 的侦听器实例发送上下文初始化事件的异常:
apache.catalina.core.StandardContext$4.run(StandardContext.java:5473) at java.lang.Thread.run(Thread.java:722) 原因:java.lang.IllegalStateException: org.slf4j.LoggerFactory 无法成功初始化。也可以看看 http://www.slf4j.org/codes.html#unsuccessfulInit 在 org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:282) 在 org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248) 在 org.apache。 commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131) at org.apache.commons.logging.LogFactory.getLog( LogFactory.java:272) 在 org.springframework.web.context.ContextCleanupListener.(ContextCleanupListener.java:43) ... 4 更多
我哪里错了?请帮忙。