Skip to content

Commit 15e3f17

Browse files
Update README.md
1 parent 79c88b0 commit 15e3f17

File tree

1 file changed

+11
-0
lines changed
  • HibernateSpringBootDataSourceBuilderC3P0Kickoff

1 file changed

+11
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
**[How To Configure C3P0 Via DataSourceBuilder](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootDataSourceBuilderC3P0Kickoff)**
12

3+
**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.
4+
5+
**Key points:**\
6+
- in pom.xml, add the `spring-boot-configuration-processor` dependency\
7+
- in pom.xml add the C3P0 dependency\
8+
- in application.properties, configure C3P0 via a custom prefix, e.g., `app.datasource.*`\
9+
- write a `@Bean` that returns the `DataSource`
10+
11+
**Output sample:**\
12+
![](https://github.com/AnghelLeonard/Hibernate-SpringBoot/blob/master/HibernateSpringBootDataSourceBuilderC3P0Kickoff/sample.png)

0 commit comments

Comments
 (0)