com.holon-platform.jdbc:holon-starter-jdbc

Holon Spring Boot JDBC starter

License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.holon-platform.jdbc
ArtifactId

ArtifactId

holon-starter-jdbc
Last Version

Last Version

5.5.0
Release Date

Release Date

Type

Type

jar
Description

Description

com.holon-platform.jdbc:holon-starter-jdbc
Holon Spring Boot JDBC starter
Project URL

Project URL

https://holon-platform.com
Project Organization

Project Organization

The Holon Platform

Download holon-starter-jdbc

How to add to project

<!-- https://jarcasting.com/artifacts/com.holon-platform.jdbc/holon-starter-jdbc/ -->
<dependency>
    <groupId>com.holon-platform.jdbc</groupId>
    <artifactId>holon-starter-jdbc</artifactId>
    <version>5.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.holon-platform.jdbc/holon-starter-jdbc/
implementation 'com.holon-platform.jdbc:holon-starter-jdbc:5.5.0'
// https://jarcasting.com/artifacts/com.holon-platform.jdbc/holon-starter-jdbc/
implementation ("com.holon-platform.jdbc:holon-starter-jdbc:5.5.0")
'com.holon-platform.jdbc:holon-starter-jdbc:jar:5.5.0'
<dependency org="com.holon-platform.jdbc" name="holon-starter-jdbc" rev="5.5.0">
  <artifact name="holon-starter-jdbc" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.holon-platform.jdbc', module='holon-starter-jdbc', version='5.5.0')
)
libraryDependencies += "com.holon-platform.jdbc" % "holon-starter-jdbc" % "5.5.0"
[com.holon-platform.jdbc/holon-starter-jdbc "5.5.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.holon-platform.core : holon-starter jar 5.5.0
com.holon-platform.jdbc : holon-jdbc-spring-boot jar 5.5.0

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-api jar 5.6.2
org.junit.jupiter : junit-jupiter-engine jar 5.6.2

Project Modules

There are no modules declared in this project.

Holon platform JDBC module

Latest release: 5.5.0

This is the JDBC module of the Holon Platform, which provides Java DataBase Connectivity support, dealing with javax.sql.DataSource configuration and management in single or multiple persistence source enviroments.

The module main features are:

  • A DataSourceBuilder API to create and configure javax.sql.DataSource instances using a configuration property source and supporting the most popular and best performing pooling DataSource implementations (HikariCP, Apache DBCP2 and Tomcat JDBC Connection Pool).
  • A basic multi-tenant DataSource implementation using the platform foundation TenantResolver interface.
  • Spring integration for javax.sql.DataSource beans configuration and initialization (with Spring's transaction management support) using the @EnableDataSource configuration annotation.
  • Spring Boot integration for single or multiple javax.sql.DataSource beans auto-configuration using application.properties/application.yaml configuration properties.

See the module documentation for details.

Just like any other platform module, this artifact is part of the Holon Platform ecosystem, but can be also used as a stand-alone library.

See Getting started and the platform documentation for further details.

At-a-glance overview

JDBC DataSource configuration:

DataSourceConfigProperties config = DataSourceConfigProperties.builder()
	.withPropertySource("datasource.properties").build();

DataSource dataSource = DataSourceBuilder.create().build(config);

JDBC DataSource builder:

DataSource dataSource = DataSourceBuilder.builder() 
	.type(DataSourceType.HIKARICP)
	.url("jdbc:h2:mem:testdb")
	.username("sa") 
	.minPoolSize(5)
	.withInitScriptResource("init.sql")
	.build();

Spring Boot multiple DataSource auto-configuration:

holon: 
  datasource:
    one:
      url: "jdbc:h2:mem:testdb1"
      username: "sa"
    two:
      url: "jdbc:h2:mem:testdb2"
      username: "sa"

See the module documentation for the user guide and a full set of examples.

Code structure

See Holon Platform code structure and conventions to learn about the "real Java API" philosophy with which the project codebase is developed and organized.

Getting started

System requirements

The Holon Platform is built using Java 8, so you need a JRE/JDK version 8 or above to use the platform artifacts.

Releases

See releases for the available releases. Each release tag provides a link to the closed issues.

Obtain the artifacts

The Holon Platform is open source and licensed under the Apache 2.0 license. All the artifacts (including binaries, sources and javadocs) are available from the Maven Central repository.

The Maven group id for this module is com.holon-platform.jdbc and a BOM (Bill of Materials) is provided to obtain the module artifacts:

Maven BOM:

<dependencyManagement>
    <dependency>
        <groupId>com.holon-platform.jdbc</groupId>
        <artifactId>holon-jdbc-bom</artifactId>
        <version>5.5.0</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
</dependencyManagement>

See the Artifacts list for a list of the available artifacts of this module.

Using the Platform BOM

The Holon Platform provides an overall Maven BOM (Bill of Materials) to easily obtain all the available platform artifacts:

Platform Maven BOM:

<dependencyManagement>
    <dependency>
        <groupId>com.holon-platform</groupId>
        <artifactId>bom</artifactId>
        <version>${platform-version}</version>
        <type>pom</type>
        <scope>import</scope>
    </dependency>
</dependencyManagement>

See the Artifacts list for a list of the available artifacts of this module.

Build from sources

You can build the sources using Maven (version 3.3.x or above is recommended) like this:

mvn clean install

Getting help

Examples

See the Holon Platform examples repository for a set of example projects.

Contribute

See Contributing to the Holon Platform.

Gitter chat Join the contribute Gitter room for any question and to contact us.

License

All the Holon Platform modules are Open Source software released under the Apache 2.0 license.

Artifacts list

Maven group id: com.holon-platform.jdbc

Artifact id Description
holon-jdbc Core artifact, providing DataSourceBuilder API and multi-tenancy support
holon-jdbc-spring Spring integration using the @EnableDataSource annotation
holon-jdbc-spring-boot Spring Boot integration for DataSource auto-configuration
holon-starter-jdbc Spring Boot starter for DataSource auto-configuration
holon-starter-jdbc-hikaricp Spring Boot starter for DataSource auto-configuration using the HikariCP pooling DataSource implementation
holon-jdbc-bom Bill Of Materials
documentation-jdbc Documentation
com.holon-platform.jdbc

Holon Platform

The Holon Platform is a Java development ecosystem to create and maintain high quality, enteprise-grade web applications and services.

Versions

Version
5.5.0
5.4.0
5.3.0
5.2.4
5.2.3
5.2.2
5.2.1
5.2.0
5.2.0-rc2
5.2.0-rc1
5.2.0-alpha2
5.2.0-alpha1
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0