Jens Schauder 1582a4d475 DATAJDBC-105 - Test with multiple databases.
Different databases are now supported by means of Maven Profiles and Spring Profiles. There is one Profile for each supported database. The default Profile is equivalent to hql. There is a Maven Profile all-dbs, which runs the integration tests against all databases.

The databases need to be started outside the build. The build assumes the default configuration as I found it after `brew install <database>`

For now we support the databases mysql, postgres and hsqldb.

In order to make the new databases work setting of properties and reading generated ids was improved to do some simple conversions. This might be considered a first step towards DATAJDBC-104.

The project root contains some basic scripts for starting and stopping databases, as well as running a build against all supported databases. Integration tests using a database now use Rules instead of JUnit runners. This gives more flexibility when adding fancy stuff to the Tests in the form of other Rules.

Related issue: DATAJDBC-104.
Original pull request: #5.
2017-06-19 13:24:52 +02:00
2017-02-17 11:08:07 +01:00
2017-06-19 13:24:26 +02:00

Spring Data JDBC

The primary goal of the Spring Data project is to make it easier to build Spring-powered applications that use data access technologies. This module deals with enhanced support for JDBC based data access layers.

Features

Getting Help

Quick Start

Execute Tests

Fast running tests

Fast running tests can executed with a simple

mvn test

This will execute unit tests and integration tests using an in-memory database.

Running tests with a real database

To run the integration tests against a specific database you nned to have the database running on your local machine and then execute.

mvn test -Dspring.profiles.active=<databasetype>

This will also execute the unit tests.

Currently the following databasetypes are available:

  • hsql (default, does not need to be running)
  • mysql

Run tests with all databases

mvn test -Pall-dbs

This will execute the unit tests, and all the integration tests with all the databases we currently support for testing. The databases must be running.

Contributing to Spring Data JDBC

Here are some ways for you to get involved in the community:

  • Get involved with the Spring community by helping out on stackoverflow by responding to questions and joining the debate.
  • Create JIRA tickets for bugs and new features and comment and vote on the ones that you are interested in.
  • Github is for social coding: if you want to write code, we encourage contributions through pull requests from forks of this repository. If you want to contribute code this way, please reference a JIRA ticket as well covering the specific issue you are addressing.
  • Watch for upcoming articles on Spring by subscribing to spring.io.

Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributors agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. If you forget to do so, you'll be reminded when you submit a pull request. Active contributors might be asked to join the core team, and given the ability to merge pull requests.

Description
No description provided
Readme 14 MiB
Languages
Java 100%