Advertisement
Guest User

Untitled

a guest
Sep 12th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <beans xmlns="http://www.springframework.org/schema/beans"
  4. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
  5. xmlns:context="http://www.springframework.org/schema/context"
  6. xmlns:jee="http://www.springframework.org/schema/jee" xmlns:lang="http://www.springframework.org/schema/lang"
  7. xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"
  8. xmlns:util="http://www.springframework.org/schema/util"
  9. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
  10.  
  11. <tx:annotation-driven transaction-manager="transactionManager" />
  12.  
  13. <bean id="transactionManager"
  14. class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  15. <property name="sessionFactory" ref="sessionFactory" />
  16. </bean>
  17.  
  18. <bean id="propertyConfigurer"
  19. class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
  20. p:location="classpath:jdbc.properties" />
  21.  
  22.  
  23.  
  24. <bean id="dataSource"
  25. class="org.springframework.jdbc.datasource.DriverManagerDataSource"
  26. p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.databaseurl}"
  27. p:username="${jdbc.username}" p:password="${jdbc.password}" />
  28.  
  29.  
  30. <bean id="sessionFactory"
  31. class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  32. <property name="dataSource" ref="dataSource" />
  33.  
  34. <property name="configLocation">
  35. <value>classpath:hibernate.cfg.xml</value>
  36. </property>
  37. <property name="configurationClass">
  38. <value>org.hibernate.cfg.AnnotationConfiguration</value>
  39. </property>
  40. <property name="hibernateProperties">
  41. <props>
  42. <prop key="hibernate.show_sql">true</prop>
  43. <prop key="hibernate.dialect">${jdbc.dialect}</prop>
  44. <prop key="hibernate.connection.charSet">UTF-8</prop>
  45. </props>
  46. </property>
  47. </bean>
  48.  
  49. <bean id="contextApplicationContextProvider" class="com.epam.training.controller.context.AppContextProvider"></bean>
  50. <bean id="svnRepositoryProvider" class="com.epam.training.controller.svn.SVNRepositoryProvider"
  51. scope="session"></bean>
  52.  
  53. <bean id="roleHierarchy"
  54. class="org.springframework.security.access.hierarchicalroles.RoleHierarchyImpl">
  55. <property name="hierarchy">
  56. <value>
  57. ADMIN > USER
  58. USER > GUEST
  59. </value>
  60. </property>
  61. </bean>
  62.  
  63. <bean id="accessDecisionManager"
  64. class="org.springframework.security.access.vote.AffirmativeBased">
  65. <property name="decisionVoters">
  66. <list>
  67. <bean
  68. class="org.springframework.security.web.access.expression.WebExpressionVoter">
  69. <property name="expressionHandler">
  70. <bean
  71. class="org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler">
  72. <property name="roleHierarchy" ref="roleHierarchy" />
  73. </bean>
  74. </property>
  75. </bean>
  76. </list>
  77. </property>
  78. </bean>
  79. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement