Advertisement
Guest User

Untitled

a guest
Jul 29th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans:beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:mvc="http://www.springframework.org/schema/mvc"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5. xmlns:context="http://www.springframework.org/schema/context"
  6. xmlns:p="http://www.springframework.org/schema/p"
  7. xmlns:tx="http://www.springframework.org/schema/tx"
  8. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  9. http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
  10. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
  11. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
  12.  
  13.  
  14. <context:annotation-config />
  15. <context:component-scan base-package="com.asurion" />
  16.  
  17. <resources mapping="/js/**" location="/js/" />
  18. <resources mapping="/css/**" location="/css/" />
  19.  
  20. <beans:bean
  21. class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  22. <property name="prefix">
  23. <value>/WEB-INF/jsp/</value>
  24. </property>
  25. <property name="suffix">
  26. <value>.jsp</value>
  27. </property>
  28. </beans:bean>
  29.  
  30. <beans:bean id="messageSource"
  31. class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
  32. <property name="basename" value="classpath:messages" />
  33. <property name="defaultEncoding" value="UTF-8" />
  34. </beans:bean>
  35. <beans:bean id="propertyConfigurer"
  36. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
  37. p:location="/WEB-INF/jdbc.properties" />
  38.  
  39. <beans:bean id="dataSource"
  40. class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
  41. p:driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
  42. p:url="jdbc:sqlserver://localhost:1433;DataBaseName=test" p:username="test"
  43. p:password="test" />
  44.  
  45.  
  46. <beans:bean id="sessionFactory"
  47. class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  48. <property name="dataSource" ref="dataSource" />
  49. <property name="configLocation">
  50. <value>classpath:hibernate.cfg.xml</value>
  51. </property>
  52. <property name="configurationClass">
  53. <value>org.hibernate.cfg.AnnotationConfiguration</value>
  54. </property>
  55. <property name="hibernateProperties">
  56. <props>
  57. <prop key="hibernate.dialect">com.asurion.dialect.SQlServerDBDialect</prop>
  58. <prop key="hibernate.show_sql">true</prop>
  59. </props>
  60. </property>
  61. </beans:bean>
  62.  
  63. <beans:bean id="reportDAO" class="com.asurion.dao.ReportDaoImpl"></beans:bean>
  64. <beans:bean id="reportManager" class="com.asurion.service.ReportManagerImpl"></beans:bean>
  65.  
  66. <tx:annotation-driven />
  67. <beans:bean id="transactionManager"
  68. class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  69. <property name="sessionFactory" ref="sessionFactory" />
  70. </beans:bean>
  71.  
  72. </beans:beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement