struts2 + spring 很奇怪的错误,有经验的来看看100分求助。
异常信息如下
10:20:56,468 DEBUG DefaultListableBeanFactory:385 - No bean named 'org.apache.struts2.dispatcher.ServletDispatcherResult' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@1eda64e: defining beans [errorMsgSendDao,errMsgSendService,propertyConfigurer,transactionManager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,dataSource,jdbcTemplate]; root of factory hierarchy
10:20:56,500 DEBUG DefaultListableBeanFactory:198 - Ignoring constructor [public org.apache.struts2.dispatcher.ServletDispatcherResult(java.lang.String)] of bean 'org.apache.struts2.dispatcher.ServletDispatcherResult': org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.struts2.dispatcher.ServletDispatcherResult': Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: : No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [java.lang.String] is defined: Unsatisfied dependency of type [class java.lang.String]: expected at least 1 matching bean
10:20:56,531 DEBUG DefaultListableBeanFactory:214 - Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
10:20:56,546 DEBUG DefaultListableBeanFactory:214 - Returning cached instance of singleton bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0'
10:20:56,562 DEBUG CachedIntrospectionResults:218 - Getting BeanInfo for class [org.apache.struts2.dispatcher.ServletDispatcherResult]
10:20:56,593 DEBUG CachedIntrospectionResults:234 - Caching PropertyDescriptors for class [org.apache.struts2.dispatcher.ServletDispatcherResult]
10:20:56,609 DEBUG CachedIntrospectionResults:243 - Found bean property 'class' of type [java.lang.Class]
10:20:56,625 DEBUG CachedIntrospectionResults:243 - Found bean property 'encode' of type [boolean]
10:20:56,625 DEBUG CachedIntrospectionResults:243 - Found bean property 'lastFinalLocation' of type [java.lang.String]
10:20:56,640 DEBUG CachedIntrospectionResults:243 - Found bean property 'location' of type [java.lang.String]
10:20:56,656 DEBUG CachedIntrospectionResults:243 - Found bean property 'parse' of type [boolean]
10:20:56,703 DEBUG ServletDispatcherResult:113 - Forwarding to location /MyJsp.jsp
10:20:56,750 DEBUG InstantiatingNullHandler:72 - Entering nullPropertyValue [target=[com.linkage.action.ErrorMsgSendAction@c042ab, com.opensymphony.xwork2.DefaultTextProvider@150ed68], property=org]
10:21:06,968 DEBUG I18nInterceptor:145 - after Locale=zh_CN
10:21:06,968 DEBUG I18nInterceptor:149 - intercept }
我仅仅是在MyJsp页面上有一个按钮用来提交到action,action里写了一个测试的方法如下
public String abc(){
System.out.println("abc");
return "abc";
}
现在的问题是每次执行到return 语句后就会出现上面的异常。这个异常只有在debug下才出现,在info下不会出现。并且这个异常不影响项目的运行。我在网上也搜了一下这个异常,但是没看到有解决方案。有哪位大侠遇到过这个情况吗?求助。