web.xml内需要加上注册ApplicationContext
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param><listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>你有没有写对?

解决方案 »

  1.   

    Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [$Proxy1] to required type [cn.qdqn.biz.impl.GoodsBizImpl] for property 'goodsbiz': no matching editors or conversion strategy found
    看看你的你的 org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator这个bean是不是设置proxyTargetClass为true了
      

  2.   

      <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationContext*.xml</param-value>
    </context-param>
    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>web.xml里边注册了啊
      

  3.   

    建议LZ把applicationContext.xml贴出来看看。应该是你配置的有问题。
      

  4.   

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
      <bean id="sessionFactory"
    class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    <property name="configLocation"
    value="classpath:hibernate.cfg.xml">
    </property>
    </bean>

    <!-- Dao注入 -->
    <bean id="TUserDAO" class="cn.qdqn.dao.TUserDAO">
    <property name="sessionFactory">
    <ref bean="sessionFactory" />
    </property>
    </bean>
    <bean id="BidDAO" class="cn.qdqn.dao.BidDAO">
    <property name="sessionFactory">
    <ref bean="sessionFactory" />
    </property>
    </bean>
    <bean id="GoodsDAO" class="cn.qdqn.dao.GoodsDAO">
    <property name="sessionFactory">
    <ref bean="sessionFactory" />
    </property>
    </bean>
    <!-- Biz注入 -->
    <bean id="GoodsBizImpl" class="cn.qdqn.biz.impl.GoodsBizImpl">
    <property name="goodsDAO" ref="GoodsDAO"></property>
    <property name="userDAO" ref="TUserDAO"></property>
    </bean>

    <bean id="TUserBizImpl" class="cn.qdqn.biz.impl.TUserBizImpl">
    <property name="t" ref="TUserDAO"></property>
    </bean>
    <!-- Action注入 -->
    <bean name="/goods" class="cn.qdqn.web.action.GoodsAction">
    <property name="goodsbiz" ref="GoodsBizImpl"></property>
    </bean>

    <bean name="/tuser" class="cn.qdqn.web.action.TuserAction">
    <property name="tuser" ref="TUserBizImpl"></property>
    </bean>
    <!-- 建立事务管理器 -->
    <bean id="transactionManager"
    class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory">
    <ref local="sessionFactory" />
    </property>
    </bean>
    <!-- 定义事务通知 -->
    <tx:advice id="txAdvice" transaction-manager="transactionManager">
    <tx:attributes>
    <!-- 对查找方法进行只读事务通知要求查找方法以find开头 可按需要修改 -->
    <tx:method name="find*" propagation="SUPPORTS" read-only="true" />
    <!-- 对其它方法如 增 删 改进行事务支持 -->
    <tx:method name="*" propagation="REQUIRED" />
    </tx:attributes>
    </tx:advice>
    <!-- 切面定义 -->
    <aop:config>
    <!-- 对cn.qdqn.biz包及子包中的任意方法进行切面 -->
    <aop:pointcut id="bizMethods"
    expression="execution(* cn.qdqn.biz.impl..*.*(..))" />
    <aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" />
    </aop:config>

    </beans>
      

  5.   

    你的Dao是不是继承了Spring的HibernateDaoSupport,没有的话修改下试试
      

  6.   

    或者:
    在你的action里是不是这么写的?private GoodsBizImpl goodsbiz;//get... set...
    如果是的话,修改成:
    private GoodsBiz goodsbiz;// get... set... 
    //也就是声明用GoodsBizImpl 所实现的接口类型(假设是:GoodsBiz )。
    //默认是针对接口进行代理
      

  7.   

    。。
    或者:
    修改applicationContext.xml中
    <tx:advice id="txAdvice" transaction-manager="transactionManager"> 
    -------->
    <tx:advice id="txAdvice" transaction-manager="transactionManager" proxy-target-class="true"