首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

applicationContext.xml配置有关问题

2012-12-21 
applicationContext.xml配置问题。这那里有错。求个有耐心的人给解答下。谢谢applicationContext.xmlbean id

applicationContext.xml配置问题。
这那里有错。求个有耐心的人给解答下。谢谢
applicationContext.xml
<bean id="gtdao" class="com.jwlc.Dao.Impl.GoodsTypeDaoImpl">
        <property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="gtbiz" class="com.jwlc.Biz.Impl.GoodsTypeBizImpl">
<property name="gtDao" ref="gtdao"></property>
</bean>
<bean name="/zhaobiao" class="com.jwlc.Action.GoodsTypeAction">
<property name="biz" ref="gtbiz"></property>
</bean>


注:
private GoodsTypeBiz gtbiz;      //action包

public void setBiz(GoodsTypeBiz gtbiz) {
this.gtbiz = gtbiz;
      }

public GoodsTypeDao gtdao;      //diz包

public void setGtDao(GoodsTypeDao gtDao) {
this.gtdao = gtdao;
}
[最优解释]
什么错啊,就看这个很蛋疼!
[其他解释]
<bean id="gtbiz" class="com.jwlc.Biz.Impl.GoodsTypeBizImpl">
<property name="gtDao" ref="gtdao"></property>
</bean>
是不是要添加sessionfactory属性
[其他解释]
<bean name="/zhaobiao" class="com.jwlc.Action.GoodsTypeAction">
 <property name="biz" ref="gtbiz"></property>
 </bean>

是ID
[其他解释]
嗯嗯,是id,唯一标识注入的对象。

热点排行