Spring beans——SSH (Spring+Struts+Hibernate)框架搭建之配置文件序列三

      Spring的配置除了applicationContext.xml外,往往還需要配置action和beans,相關配置文件命名爲:applicationContext_actions.xml和applicationContext_beans.xml,繼上次介紹了Spring——SSH (Spring+Struts+Hibernate)框架搭建之配置文件序列二後,這次主要介紹一下applicationContext.xml的配置。


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       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-3.1.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd" >
	
	<bean name="testAction" class="net.cxiny.action.TestAction" scope="prototype">
		<property name="testMgr" ref="testMgr" />
	</bean>
	
</beans>


發佈了85 篇原創文章 · 獲贊 15 · 訪問量 20萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章