Advertisement
Guest User

Untitled

a guest
Aug 17th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  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:mvc="http://www.springframework.org/schema/mvc"
  6. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  7. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
  8. http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/beans">
  9.  
  10. <context:annotation-config />
  11. <context:component-scan base-package="os.properties.controller" />
  12.  
  13. <context:component-scan base-package="os.properties.service" />
  14.  
  15. <context:component-scan base-package="os.properties.dao"/>
  16.  
  17. <mvc:annotation-driven />
  18.  
  19. <mvc:view-controller path="/index" view-name="index" />
  20.  
  21. <mvc:view-controller path="/protected" view-name="protected" />
  22.  
  23. <bean id="osPropertiesController" class="os.properties.controller.OsPropertiesController"/>
  24.  
  25. <bean id="jspViewResolver"
  26. class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  27. <property name="viewClass"
  28. value="org.springframework.web.servlet.view.JstlView" />
  29. <property name="prefix" value="/WEB-INF/jsp/" />
  30. <property name="suffix" value=".jsp" />
  31. </bean>
  32.  
  33. <bean id="userClass" class="java.lang.Class"
  34. factory-method="forName">
  35. <constructor-arg value="os.properties.entities.HardDrive"/>
  36. </bean>
  37.  
  38. <!--bean id="dataSource"
  39. class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
  40. p:driverClassName="${jdbc.driverClassName}"
  41. p:url="${jdbc.databaseurl}" p:username="${jdbc.username}"
  42. p:password="${jdbc.password}" /-->
  43.  
  44.  
  45. <!-- >bean id="sessionFactory"
  46. class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  47. <property name="dataSource" ref="dataSource" />
  48. <property name="configLocation">
  49. <value>classpath:hibernate.cfg.xml</value>
  50. </property>
  51. <property name="configurationClass">
  52. <value>org.hibernate.cfg.AnnotationConfiguration</value>
  53. </property>
  54. <property name="hibernateProperties">
  55. <props>
  56. <prop key="hibernate.dialect">${jdbc.dialect}</prop>
  57. <prop key="hibernate.show_sql">true</prop>
  58. </props>
  59. </property>
  60. </bean-->
  61.  
  62. <bean id="sessionFactory"
  63. class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  64. </bean>
  65.  
  66. <bean id="osPropertiesService" class="os.properties.service.OSPropertiesServiceImpl" autowire="byType">
  67. <property name="sessionFactory" ref="sessionFactory"/>
  68. </bean>
  69.  
  70. <bean id="hardDriveDao" class="os.properties.dao.HardDriveDAOImpl"/>
  71.  
  72. <bean id="hardDriveDaoImpl" class="os.properties.dao.AbstractHardDriveDAOImpl"/>
  73.  
  74.  
  75.  
  76. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement