Guest User

Untitled

a guest
Nov 12th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. <!-- Define Database DataSource / connection pool -->
  2. <bean id="myDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
  3. destroy-method="close">
  4. <property name="driverClass" value="com.mysql.jdbc.Driver" />
  5. <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/java_task?useSSL=false" />
  6. <property name="user" value="me" />
  7. <property name="password" value="me" />
  8.  
  9. <!-- these are connection pool properties for C3P0 -->
  10. <property name="minPoolSize" value="5" />
  11. <property name="maxPoolSize" value="20" />
  12. <property name="maxIdleTime" value="30000" />
  13. </bean>
  14.  
  15. <!-- Define Hibernate session factory -->
  16. <bean id="sessionFactory"
  17. class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
  18. <property name="dataSource" ref="myDataSource" />
  19. <property name="packagesToScan" value="com.javatask.entity" />
  20. <property name="hibernateProperties">
  21. <props>
  22. <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
  23. <prop key="hibernate.show_sql">true</prop>
  24. </props>
  25. </property>
  26. </bean>
Add Comment
Please, Sign In to add comment