本帖最后由 MasterLuo 于 2010-06-20 22:24:43 编辑

解决方案 »

  1.   

    配置 文件主要有四个applicationContext_***.xml形式的,我的类在com.project.common包中,大家给个例子也行。着急用
      

  2.   

    你这个类用到了Spring实例的类,那么你这个类最好也给Spring去管理.!
    否则你要自己实例Spring容器以后再去手工set,这样不好.!
    在你Spring的配置文件中,一般都在applicationContext.xml中定义你的bean,然后在这个类中添加你要用的services接口, 然后让Spring给你注入就好!
      

  3.   

    在servicesImpl类中注入你的dao 然后写上set()方法  在applicationContext.xml配置上dao。然后配置service <bean id="depthnewsDao" class="org.myledu.dao.impl.DepthnewsDaoImpl">
         <property name="sf" ref="sessionFactory" />
        </bean>
        <bean id="depthnewsService" class="org.myledu.service.impl.DepthnewsServiceImpl">
    <property name="depthnewsDao" ref="depthnewsDao"/>
    </bean>
      

  4.   

    不知道楼主要配置什么 
    要注入 BEAN吗 
      

  5.   

    就是一个SSH,需要用到一个类,这个类又类需要查找数据库等操作,需要用到一些DAO文件什么的,怎么配置呢?