shaikabdulubed

Untitled

Jan 28th, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4.    xmlns:context="http://www.springframework.org/schema/context"
  5.    xmlns:p="http://www.springframework.org/schema/p"
  6.    xsi:schemaLocation="http://www.springframework.org/schema/beans
  7.    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  8.    http://www.springframework.org/schema/context
  9.    http://www.springframework.org/schema/context/spring-context-3.0.xsd">
  10.  
  11.  
  12.  <!--  Activating Annotations• -->
  13.  
  14.    <context:annotation-config/>
  15.    <context:component-scan base-package="com.app"/>
  16.  
  17.  <!-- Configure InternalResourceViewResolver -->
  18.    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  19.    <property name="prefix" value="/WEB-INF/jsps/"/>
  20.    <property name="suffix" value=".jsp"></property>  
  21.    </bean>
  22.  
  23.  <!-- DriverManagerDataSouce Class -->
  24. <bean   name="dsObj"
  25.             class="org.springframework.jdbc.datasource.DriverManagerDataSource"
  26.             p:url="jdbc:oracle:thin:@localhost:1521:XE"
  27.             p:username="system"
  28.             p:password="manager">
  29. </bean>
  30.  <!-- AnnotationSessionFactoryBean -->
  31. <bean   name="asObj"
  32.             class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
  33.             <property name="dataSouce" ref="dsObj"/>
  34.     <!-- HibernateProperties -->
  35.     <property name="hibernateProperties">
  36.         <props>
  37.             <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect></prop>
  38.             <prop key="hibernate.show_sql">true</prop>
  39.             <prop key="hibernate.hbm2ddl.auto">create</prop>
  40.         </props>
  41.     </property>
  42.     <!-- AnnotatedClasses -->
  43.     <property name="annotatedclasses">
  44.         <list>
  45.             <value>com.app.model.Employee</value>
  46.         </list>
  47.     </property>
  48. </bean>
  49.  <!-- HibernateTempleate -->
  50. <bean name="htObj" class="org.springframework.orm.hibernate3.HibernateTemplate">
  51.     <property name="sessionFactory">
  52.         <ref bean="asObj"/>
  53.     </property>
  54. </bean>
  55. </beans>
Add Comment
Please, Sign In to add comment