<? 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: context =Http://www.springframework.org/schema/context"
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.0.xsd Http://www.springframework.org/schema/context Http://www.springframework.org/schema/context/spring-context-3.0.xsd Http://www.springframework.org/schema/tx Http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> <Context: Property-placeholder location ="Classpath: JDBC. properties"/> <Context: component-scan base-package ="Net. roseindia"/> <TX: annotation-driven transaction-Manager ="Hibernatetransactionmanager"
/> <Bean id ="Jspviewresolver"
Class ="Org. springframework. Web. servlet. View. internalresourceviewresolver"> <Property name ="Viewclass"
Value ="Org. springframework. Web. servlet. View. jstlview"/> <Property name ="Prefix"Value =/WEB-INF/View /"/> <Property name ="Suffix"Value =". Jsp"/> </Bean> <Bean id ="Datasource"
Class ="Org. springframework. JDBC. datasource. drivermanagerdatasource"> <Property name ="Driverclassname"Value ="$ {Database. Driver }"/> <Property name ="Url"Value ="$ {Database. url }"/> <Property name ="Username"Value ="$ {Database. User }"/> <Property name ="Password"Value ="$ {Database. Password }"/> </Bean> <Bean id ="Sessionfactory"
Class ="Org. springframework. Orm. hibernate3.annotation. annotationsessionfactorybean"> <Property name ="Datasource"Ref ="Datasource"/> <Property name ="Annotatedclasses"> <List> <Value> net. roseindia. model. Article </value> </List> </Property> <Property name ="Hibernateproperties"> <Props> <Prop key ="Hibernate. dialect">$ {Hibernate. dialect} </prop> <Prop key ="Hibernate. show_ SQL">$ {Hibernate. show_ SQL} </prop> </Props> </Property> </Bean> <Bean id ="Hibernatetransactionmanager"
Class ="Org. springframework. Orm. hibernate3.hibernatetransactionmanager"> <Property name ="Sessionfactory"Ref ="Sessionfactory"/> </Bean> </Beans> |