1.spring配置文件
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd ">
<context:annotation-config></context:annotation-config>
<context:component-scan base-package="web.action"></context:component-scan>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.OracleDriver"></property>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl"></property>
<property name="username" value="system"></property>
<property name="password" value="accp"></property>
<property name="maxActive" value="100"></property>
</bean>

<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="configLocation" value="classpath:mybatis.cfg.xml"></property>
</bean>
<bean id="dao" class="dao.impl.ObjectDaoImpl">
<property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
</bean>
<bean id="biz" class="biz.impl.UserBizImpl">
<property name="dao" ref="dao"></property>
</bean>
<bean id="user" class="web.action.UserAction">
<property name="biz" ref="biz"></property>
</bean>
</beans>2.web.xml
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 <servlet>
  <servlet-name>spring</servlet-name>
  <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  <init-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>/WEB-INF/classes/applicationContext.xml</param-value>
  </init-param>
 </servlet>
 <servlet-mapping>
  <servlet-name>spring</servlet-name>
  <url-pattern>*.do</url-pattern>
 </servlet-mapping>
 <welcome-file-list>
  <welcome-file>index.jsp</welcome-file>
 </welcome-file-list>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>
</web-app>3.mybatis.cfg.xml
<configuration>
<mappers>
<mapper resource="entity/User.xml"/>
</mappers>
</configuration>4.User.xml
<mapper namespace="dao.UserDao">
 
</mapper>5.UserAction@Controller
public class UserAction {
private UserBiz biz;

public UserBiz getBiz() {
return biz;
} public void setBiz(UserBiz biz) {
this.biz = biz;
}
@RequestMapping("user")
public String init(){
List<User> users=biz.findAll();
for(User u:users){
System.out.println(u.getName());
}
return "/index.jsp";
}
}如果我在spring文件里配置useraction的依赖注入,就会报和@RequestMapping("user")的冲突,如果不配置,action类里的biz就是NULL,无法调用其方法,我哪里用错了么