当前位置: 代码迷 >> J2EE >> spring mvc @RequestMapping("/flow_statistic.jspx")引文报错
  详细解决方案

spring mvc @RequestMapping("/flow_statistic.jspx")引文报错

热度:465   发布时间:2016-04-17 23:50:14
spring mvc @RequestMapping("/flow_statistic.jspx")注解报错
各位大侠,本人之前使用spring mvc 的@RequestMapping,采用的是路径配置方式,例如:@RequestMapping("/hello"),一直没有问题。今天在查看其他人写的项目时,采用的是@RequestMapping("/flow_statistic.jspx"),我在spring 配置文件中自动扫描注解,如:
<!-- 控制器所在的包{添加注解的} -->
<context:component-scan base-package="com.jeecms.cms.action.front" />

在项目启动时,报错:如下:
Java HotSpot(TM) Client VM warning: MaxNewSize (262144k) is equal to or greater than the entire heap (262144k).  A new generation size of 262080k will be used.
2014-7-23 0:41:35 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
2014-7-23 0:41:35 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: E:\Java\jdk6\bin;E:\kaifa_gongju\tomcat-6.0.18\bin
2014-7-23 0:41:35 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-80
2014-7-23 0:41:35 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 672 ms
2014-7-23 0:41:35 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2014-7-23 0:41:35 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
2014-7-23 0:41:38 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
2014-7-23 0:42:07 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'JeeCmsAdmin'
2014-7-23 0:42:17 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'JeeCmsFront'
00:42:20.140 ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in ServletContext resource [/WEB-INF/config/jeecms-servlet-front.xml]: Initialization of bean failed; nested exception is java.lang.IllegalStateException: Cannot map handler 'siteFlowAct' to URL path [/flow_statistic.jspx]: There is already handler of type [class com.jeecms.cms.action.front.CmsSiteFlowAct] mapped.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:398) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1146) ~[spring.context-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275) ~[spring.beans-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:424) ~[spring.web.servlet-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:339) ~[spring.web.servlet-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:328) ~[spring.web.servlet-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:523) ~[spring.web.servlet-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:749) ~[spring.web.servlet-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.web.servlet.FrameworkServlet$ContextRefreshListener.onApplicationEvent(FrameworkServlet.java:1) ~[spring.web.servlet-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51) ~[spring.context-3.0.5.jar:3.0.5.RELEASE]
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97) ~[spring.context-3.0.5.jar:3.0.5.RELEASE]
  相关解决方案