Skip to content

Latest commit

 

History

History

HibernateSpringBootDataSourceBuilderC3P0Kickoff

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

How To Configure C3P0 Via DataSourceBuilder

Description: This is a kickoff application that set up C3P0 via DataSourceBuilder. The jdbcUrl is set up for a MySQL database. For testing purpose the application uses an ExecutorService for simulating concurrent users.

Key points:
- in pom.xml, add the spring-boot-configuration-processor dependency
- in pom.xml add the C3P0 dependency
- in application.properties, configure C3P0 via a custom prefix, e.g., app.datasource.*
- write a @Bean that returns the DataSource

Output sample: