启动项目的时候报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.aop.support.AopUtils.selectInvocableMethod(Ljava/lang/reflect/Method;Ljava/lang/Class;)Ljava/lang/reflect/Method;
我只在controller中写了一个简单的方法测试一下,
代码如下:
@Controller
@RequestMapping(value ="/User")
public class UserController {
@RequestMapping(value ="/login.do")
@ResponseBody
public UserInfo login(){
return new UserInfo();
}
}
springmvc的配置文件是这样:
<!-- 扫描web相关的bean -->
<context:component-scan base-package="com.business.Controller"/>
<!-- 开启SpringMVC注解模式 -->
<mvc:annotation-driven>
<mvc:message-converters>
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>application/json;charset=UTF-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
service里还没创建类,Dao层使用mybatis-Generator插件自动生成的。想问下这到底是哪里除了问题?