Skip to content

A Maven built SpringBoot Service to access MySQL database using Commons DBCP2 connection pooling mechanism.

License

Notifications You must be signed in to change notification settings

qingdeng001/springboot-dbcp2-jdbc-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accessing MySQL Database (Amazon Corretto OpenJDK 11 /Spring Boot).

This is a Java/Spring Boot template for building a microservice to communicate with MySQL database.
This service demonstrates use of Apache Commons DBCP2 to manage connection pool, DataSource, JdbcTemplate and NamedParameterJdbcTemplate required to perform database operations.

Repository structure

The main files in this repository are:

  • pom.xml: specifies required dependency to build and package the application.

  • src/main/java: contains actual java application business logic ,service and persistence layer.

  • src/main/resources/application.properties: contains values (typically configured by developer), properties required to run micoservice in a desired environment.

  • mysql_scripts: database scripts to create schema,insert dummy data into MySQL.

Usage

  • Download the repository from GitHub.

  • Execute maven command to build application or directly run through IDE.

..\springboot-dbcp2-jdbc-mysql> mvn clean package -e -U

  • Run main class BootDbcp2MySqlApplication.class through IDE or through Maven Spring boot commands.
mvn spring-boot:run

License

Licensed under GNU General Public License v3.0. Please see LICENSE for details.

Happy Learning !

About

A Maven built SpringBoot Service to access MySQL database using Commons DBCP2 connection pooling mechanism.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages