could not be resolved.
在使用Spring框架时出现的 Method could not be resolved这种情况一般是配置文件的问题: 先查看头文件约束是否遗漏:
如下是正确的头文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd ">
<!-- 将User 对象交给spring容器管理 -->
<bean name="user" class="cn.itcast.bean.User"></bean>
</beans>
Spring约束添加
还没有评论,来说两句吧...