Advertisement
Guest User

Untitled

a guest
Sep 4th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.19 KB | None | 0 0
  1. <hibernate-configuration>
  2. <session-factory>
  3.  
  4. <property name="hibernate.show_sql">true</property>
  5. <property name="hibernate.use_sql_comments">true</property>
  6. <property name="hibernate.format_sql">true</property>
  7. <property name="hibernate.generate_statistics">true</property>
  8.  
  9. <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
  10. <property name="hibernate.connection.datasource">jdbc:mysql://localhost/easywordweb</property>
  11. <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
  12. <property name="hibernate.connection.url">jdbc:mysql://localhost/easywordweb</property>
  13. <property name="hibernate.connection.username">username</property>
  14. <property name="hibernate.connection.password">password</property>
  15.  
  16. <!--<property name="hibernate.connection.pool_size">140</property>-->
  17. <!--<property name="hibernate.c3p0.max_size">140</property>-->
  18. <property name="hibernate.c3p0.max_size">9</property>
  19. <property name="hibernate.c3p0.min_size">5</property>
  20. <property name="hibernate.c3p0.acquire_increment">3</property>
  21. <!--max to cache-->
  22. <property name="hibernate.c3p0.max_statements">50</property>
  23.  
  24. <!--The seconds a Connection can remain pooled but unused before being discarded. Zero means idle connections never expire. Hibernate default: 0-->
  25. <property name="hibernate.c3p0.timeout">40</property>
  26.  
  27. <!--<property name="hibernate.c3p0.validate">true</property>-->
  28. <!--<property name="hibernate.c3p0.preferredTestQuery">SELECT 1;</property>-->
  29. <!--for test, change futher-->
  30. <!---->
  31. <!--at every connection checkin to verify that the connection is valid-->
  32. <!--<property name="hibernate.c3p0.testConnectionOnCheckout">true</property>-->
  33. <!--at every connection checkout to verify that the connection is valid-->
  34. <!--<property name="hibernate.c3p0.testConnectionOnCheckin">true</property>-->
  35. <!--/for test, change futher-->
  36. <property name="hibernate.connection.provider_class">org.hibernate.c3p0.internal.C3P0ConnectionProvider</property>
  37.  
  38.  
  39. <property name="hibernate.jdbc.batch_size">20</property>
  40. <!--Number rows to be returned if no setted-->
  41. <property name="hibernate.jdbc.fetch_size">20</property>
  42. <property name="hibernate.jdbc.use_get_generated_keys">true</property>
  43.  
  44. <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
  45.  
  46. <!--FIXING: Table "...".hibernate_sequence table not found.-->
  47. <property name="hibernate.id.new_generator_mappings">false</property>
  48. </session-factory>
  49. </hibernate-configuration>
  50.  
  51. com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getPoolManager
  52. Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@11c5be52
  53. [
  54. connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@87645e0f
  55. [
  56. acquireIncrement -> 3,
  57. acquireRetryAttempts -> 30,
  58. acquireRetryDelay -> 1000,
  59. autoCommitOnClose -> false,
  60. automaticTestTable -> null,
  61. breakAfterAcquireFailure -> false,
  62. checkoutTimeout -> 0,
  63. connectionCustomizerClassName -> null,
  64. connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester,
  65. debugUnreturnedConnectionStackTraces -> false,
  66. factoryClassLocation -> null,
  67. forceIgnoreUnresolvedTransactions -> false,
  68. identityToken -> valididentitytokenhere,
  69. idleConnectionTestPeriod -> 0,
  70. initialPoolSize -> 5,
  71. maxAdministrativeTaskTime -> 0,
  72. maxConnectionAge -> 0,
  73. maxIdleTime -> 40,
  74. maxIdleTimeExcessConnections -> 0,
  75. maxPoolSize -> 9,
  76. maxStatements -> 50,
  77. maxStatementsPerConnection -> 0,
  78. minPoolSize -> 5,
  79. nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@82d61130
  80. [
  81. description -> null,
  82. driverClass -> null,
  83. factoryClassLocation -> null,
  84. identityToken -> valididentitytokenhere,
  85. jdbcUrl -> jdbc:mysql://localhost/easywordweb,
  86. properties -> { user=******, password=******}
  87. ],
  88. preferredTestQuery -> null,
  89. propertyCycle -> 0,
  90. statementCacheNumDeferredCloseThreads -> 0,
  91. testConnectionOnCheckin -> false,
  92. testConnectionOnCheckout -> false,
  93. unreturnedConnectionTimeout -> 0,
  94. usesTraditionalReflectiveProxies -> false;
  95. userOverrides: {}
  96. ],
  97. dataSourceName -> null,
  98. factoryClassLocation -> null,
  99. identityToken -> valididentitytokenhere,
  100. numHelperThreads -> 3
  101. ]
  102.  
  103. <beans
  104. xmlns="http://www.springframework.org/schema/beans"
  105. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  106. xmlns:context="http://www.springframework.org/schema/context"
  107. xmlns:cache="http://www.springframework.org/schema/cache"
  108. xmlns:aop="http://www.springframework.org/schema/aop"
  109. xmlns:security="http://www.springframework.org/schema/security"
  110. xmlns:tx="http://www.springframework.org/schema/tx"
  111. xsi:schemaLocation="
  112. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
  113. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  114. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
  115. http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
  116. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
  117. http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"
  118. xmlns:mvc="http://www.springframework.org/schema/mvc">
  119.  
  120. <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  121. <property name="prefix">
  122. <value>/views/</value>
  123. </property>
  124. <property name="suffix">
  125. <value>.jsp</value>
  126. </property>
  127. </bean>
  128.  
  129. <bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
  130. <property name="packagesToScan" value="milkiv.easyword.models"/>
  131. <property name="configLocations">
  132. <value>classpath:resources/hibernate.cfg.xml</value>
  133. </property>
  134. </bean>
  135.  
  136. <bean class="org.springframework.orm.hibernate5.HibernateTemplate">
  137. <property name="sessionFactory" ref="sessionFactory"/>
  138. </bean>
  139.  
  140.  
  141.  
  142. <bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
  143. <property name="sessionFactory" ref="sessionFactory"/>
  144. </bean>
  145.  
  146. <bean class="milkiv.easyword.service.JsonConverter"></bean>
  147. <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
  148.  
  149. <mvc:resources mapping="/resources/**" location="/resources/"/>
  150. <context:annotation-config/>
  151. <context:component-scan base-package="milkiv.easyword"/>
  152. <tx:annotation-driven/>
  153. <mvc:annotation-driven>
  154. <mvc:argument-resolvers>
  155. <bean class="org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver" />
  156. </mvc:argument-resolvers>
  157. </mvc:annotation-driven>
  158. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement