https://github.com/hendisantika/spring-boot-jdbc
Spring Boot JDBC + MySQL + HikariCP example
https://github.com/hendisantika/spring-boot-jdbc
Last synced: about 2 months ago
JSON representation
Spring Boot JDBC + MySQL + HikariCP example
- Host: GitHub
- URL: https://github.com/hendisantika/spring-boot-jdbc
- Owner: hendisantika
- Created: 2017-03-23T23:44:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2025-04-11T03:05:09.000Z (about 2 months ago)
- Last Synced: 2025-04-13T00:08:42.239Z (about 2 months ago)
- Language: Java
- Size: 179 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot JDBC + MySQL + HikariCP example
In this article, we will show you how to create a Spring Boot JDBC application + MySQL and HikariCP.
Tools used in this article :
1. Spring Boot 1.5.16.RELEASE
2. MySQL 5.7.x
3. HikariCP 2.6
4. Maven
5. Java 8
6. IntelliJ IDEA Ultimate 2018.2```java
mvn clean package
java -jar target/spring-boot-jdbc-1.0.jar
``````
java -Dspring.datasource.initialize=false -jar target/spring-boot-jdbc-1.0.jar insert newUser newPassword
```DATASOURCE = HikariDataSource (HikariPool-1)
[Usage] java xxx.jar {insert name email | display}
DATASOURCE = HikariDataSource (null)
Add customer...
Done!
```
java -Dspring.datasource.initialize=false -jar target/spring-boot-jdbc-1.0.jar display
``````
DATASOURCE = HikariDataSource (null)
Display all customers...
Customer{id=1, name='hendisantika', email='[email protected]', date=2017-03-24}
Customer{id=2, name='naruto', email='[email protected]', date=2017-03-24}
Customer{id=3, name='kakashi', email='[email protected]', date=2017-03-24}
Customer{id=4, name='newUser', email='newPassword', date=2017-03-24}
Done!
```