Commit Graph

67 Commits

Author SHA1 Message Date
Michael Simons
618bb899f2 After release update. 2020-05-29 14:57:51 +02:00
Michael Simons
632def6600 Move Cypher DSL into a separate module.
The `@Nullable` annotations have been removed. JSR 305 is dormant and we don’t want neither Spring Core nor JetBrains nor any other bigger library on the classpath for those.

Some Assertions have been copied over from Spring Core.
2020-05-13 08:52:35 +02:00
Michael Simons
4a6b1b79c9 Use only 2 digits version number on master branch. 2020-05-07 08:29:23 +02:00
Gerrit Meier
9a190e1a56 After release update.
Update examples to use the latest release version.
Set next development version to 1.0.2.
2020-05-05 06:06:59 +02:00
Gerrit Meier
da53c82073 After release update.
Update examples to use the release version.
Set next development version to 1.0.1.
2020-04-14 18:09:04 +02:00
Michael Simons
09f12fd381 After release cleanup. 2020-04-03 17:32:41 +02:00
Michael Simons
a8253d3461 Update dependencies to be able to build on JDK 14. 2020-03-30 14:07:40 +02:00
Michael Simons
2b3a885e14 Bump junit-jupiter-causal-cluster-testcontainer-extension to 4.0.1.1.
This brings back the log output. junit-jupiter-causal-cluster-testcontainer-extension 4.0.1.0 included slf4j-simple as transitive dependency and so the log was piped there.
2020-03-23 11:58:32 +01:00
Michael Simons
85260fe3ce Add automatic module names.
This closes #27.
2020-03-19 08:17:18 +01:00
Michael Simons
26a8eea25a Use Neo4j's causal bookmarks.
This brings in support for causal bookmarks of Neo4j. It requires no configuration from the user nor an additional library. It works out of the box for everything that runs inside a Spring managed transaction, for both imperative and reactive scenarios.

The core idea for both scenarios is as follows:

* Keep a list of all bookmarks ever retrieved from a cluster
* Pass that list to new transactions, the server sorts and merges them for us, no need to worry about the order
* When the transaction completes, collect the last bookmark from it and replace the used bookmarks from beforehand (and only them) with it. Thus, the bookmark returned by a parallel transactions is not affected
* The bookmarks work as a "at least" indicator, so all new transactions will see at least what they have written and are thus serialisable on the application side of things.

This closes #158. 

Co-authored-by: Gerrit Meier <meistermeier@gmail.com>
2020-03-13 11:42:20 +01:00
Michael Simons
aca814777c Setup GitHub pages for docs. 2020-03-02 21:47:22 +01:00
Michael Simons
b9110a6c73 Add documentation.
Co-authored-by: Gerrit Meier <meistermeier@gmail.com>
2020-02-25 20:52:50 +01:00
Gerrit Meier
5b833d4323 Add Spring Data REST example.
This also includes setting the mapping context for Spring internals.
The example can also be used as a dev container with vs code.
2020-02-06 10:43:48 +01:00
Michael Simons
8b14b0e90b Bump dependencies.
Some housekeeping before a possible next beta.
2020-01-30 10:57:11 +01:00
Michael Simons
86408f02eb Update license header to extend to 2020. 2020-01-28 16:02:32 +01:00
Michael Simons
505d965882 Provide a way to configure the database being used.
This fixes #124 by providing the a Neo4jDatabaseNameProvider.

The Neo4jDatabaseNameProvider allows for configuring the database used by all transactions managers and all templates. The configured database will be passed on to the Neo4j templates, both reactive and imperative. The Neo4j clients are still be able to use all databases, they don't know a fixed database name provider.

The database name provider must of course be provided to the transaction managers. Both reactive and imperative transaction managers keep on synchronising on the driver, but check the target database and will prevent switching the database in-between an application level transaction.

For those scenarios where a client wants to use a different database than the one configured with the default transaction manager, it must run in an implicit (aka auto commit transaction) or run a second transaction manager, configured to use the correct database.

In case interactions spawn multiple databases, several transaction managers must be applied and the propagation behaviour needs to be `REQUIRES_NEW`, meaning an ongoing transaction will be suspended when the database is switched and resumed when the inner transaction finishes.

The commit also contains the requried properties for the Spring Boot autoconfiguration.
2020-01-28 15:45:36 +01:00
Gerrit Meier
e2abd990f6 Upgrade R2DBC dependency to release version.
Although the R2DBC dependency is only used for testing
the BOM will get picked up by gradle.
Because it is a SNAPSHOT dependency the resolution will fail
and SDN-RX cannot be used in gradle projects if the users
do not add the Spring snapshots repository.
2020-01-24 13:15:55 +01:00
Gerrit Meier
182b5e0035 Update Java driver and driver starter.
Use the GA version of the 4.0 driver and
the Neo4j Java Driver Spring Boot starter.
2019-12-10 22:31:54 +01:00
Michael Simons
240e73e9ce Upgrade to Driver 4.0.0-rc1. 2019-11-21 16:27:25 +01:00
Michael Simons
452d7a24f2 Upgrade to Driver 4.0.0-beta03.
This closes #97.
2019-11-15 06:54:40 +01:00
Michael Simons
ad67ace2ee Update to jQAssistant-Dashboard plugin 1.7.1.
This closes #78.
2019-10-11 20:20:22 +02:00
Michael Simons
4d3ee252f6 Add DataNeo4jTest to simplify test for Neo4j.
This adds a new @DataNeo4jTest that provides additional auto configuration. When the Neo4j test harness (https://medium.com/neo4j/testing-your-neo4j-based-java-application-34bef487cc3c) is on the class-path and no other Driver bean is provided, it creates an embedded test server.

An already existing test server is recognised, so that user can run their own enterprise test harness if they want.

If test harness isn't on the class-path or excluded from the slice, the slice falls back to using an existing driver bean respectively delegates to the drivers auto configuration, thus recognising org.neo4j.driver.uri and related properties.

We can upgrade the optional dependencies for the test harness in a later step.
2019-10-10 22:53:29 +02:00
Michael Simons
5c69b0c413 Fix aggregation of test coverage.
This fixes #72.
2019-10-09 12:48:07 +02:00
Michael Simons
16dcd3c8bd Update jQAssistant to 1.7, add dashboard and (required) Git plugins. 2019-10-08 15:13:36 +02:00
Vivek Singh
4b18431283 Update to driver 4.0.0-beta02.
* fixed test : SessionConfig builder doesn't lowercase the database in this version
* success/failure becoming commit/rollback in the driver api
* Bookmark has been moved to public driver api.
2019-10-02 13:59:15 +02:00
Michael Simons
856b5c91cf Update to Spring Data Moore GA. 2019-10-01 10:17:39 +02:00
Michael Simons
094384f1db Fix convergence errors. 2019-09-17 09:34:45 +02:00
Michael Simons
ad545fc490 Update to latest Spring Data Commons and Spring Boot RCs.
This commit closes #40 by updating Spring Data Commons to RC3 and Spring Boot to M6. It also drops management of Kotlin and Project Reactor dependencies. Instead, it relies on the management done by Spring Data Commons in RC3.

Furthermore, it restores convergences between the dependencies of Spring Data R2DBC and R2DBC-H2 by using R2DBC’s bom as well.
2019-09-16 15:49:13 +02:00
Michael Simons
cb92057a55 Upgrade Java Driver to 4.0.0-beta01.
Needed adaption in
- bookmark handling
- databasename normalization
- package structure
2019-08-26 11:49:42 +02:00
Michael Simons
c7b1b9fcad Always use Spring JCL for logging. 2019-07-24 12:17:02 +02:00
Michael Simons
a34e189b4c Remove declaration of java-doc and source plugin again.
This is done by Spring Datas parent build infrastructure already when run with profile CI or distribute.

Spring Datas configuration of JavaDoc doesn’t handle self-closing html tags, so I replaced them.
2019-07-23 21:49:43 +02:00
Michael Simons
b2f9c89501 Add source and javaDoc plugin for generating needed artifacts. 2019-07-23 17:30:09 +02:00
Michael Simons
158e80f4f0 Use CI friendly version numbers.
See https://maven.apache.org/maven-ci-friendly.html for reference.

In addition, all examples are now independ from the main project. They use the same technique for the dependencies as the neo4j-java-driver-spring-boot-starter.

When run without the version numbers set, they define their own and recreate the dependencies version based on that.

When the first alpha has been released, the changelist attribute should reflect that, too.
2019-07-17 12:15:24 +02:00
Michael Simons
dcffeb4f78 Update Neo4j driver to 2.0.0-alpha03. 2019-07-09 10:45:11 +02:00
Michael Simons
484d936891 Restructure examples folder.
This reassembles the structure the driver and the driver-starter has.
2019-07-01 11:55:47 +02:00
Michael Simons
3e5e4901f6 Make sure JavaDoc generation works on JDK11+.
Discovered during research whether delombok works.
2019-07-01 11:12:56 +02:00
Michael Simons
af3fdd059d Make sure we use a JDK12 compatible delombok version. 2019-07-01 10:15:48 +02:00
Michael Simons
c82493092b Remove unused version and dependency.
This is the starters responsibility.
2019-06-27 16:23:15 +02:00
Michael Simons
3b058210bf Provide basic callback infrastructure and auditing support. (#17)
* Update Spring Data commons to 2.2.0-RC1.

Also update Spring Data R2DBC to a buildsnapshot as its reactive
transaction manager doesn't work with the latest Spring Framework 5.2
and Spring Data Parent installments.

* Provide BeforeBindCallback and related infrastructure.
* Provide reactive BeforeBindCallback and related infrastructure.
* Implement imperative and reactive auditing of entities.
2019-06-26 14:20:32 +02:00
Gerrit Meier
e4014f343b Introduce strict JavaDoc checks.
* check for empty at-clauses.
* add more return statements.
* add missing since JavaDoc annotation.
2019-06-12 16:48:04 +02:00
Michael Simons
223a150e15 Add Starter and example projects to parent pom. 2019-06-12 10:42:19 +02:00
Gerrit Meier
70b75995c4 Separate Spring Boot Starter and example projects from SDN-RX.
This creates independent projects for the Spring Boot Starter and the examples. The Spring Boot Starter project inherits now from Spring Boot.

The required Java version for the examples has been bumped to 12 (latest version as of writing).
2019-06-12 10:13:51 +02:00
Michael Simons
6edb306a65 Extract driver starter from SDN-RX. 2019-06-05 21:38:40 +02:00
Gerrit Meier
ae5be3e8dd Set fix milestone version for Spring Data parent. 2019-06-05 21:30:44 +02:00
Gerrit Meier
fe2e90dc66 Move classes to new neo4j package and change Maven coordinates.
According to the new maven artifact coordinates the classes should live
in a package that represents the right naming.
2019-06-04 13:18:15 +02:00
Gerrit Meier
67bee60622 Introduce reactive transaction manager.
- Set dependency to Spring Data commons 2.2.0.M4.
- Transaction synchronization with other transaction managers.
- Shared Neo4jTransactionUtils for reactive and imperative.
2019-06-04 12:36:34 +02:00
Michael Simons
bca87cd138 Update to Java-Driver 2.0.0-alpha02. 2019-06-03 12:06:22 +02:00
Gerrit Meier
cff28ade1c Introduce Kotlin compatibility tests for immutable mapping. 2019-05-17 10:38:26 +02:00
Michael Simons
5c6303042b All all kinds of tests skipped or individually. 2019-04-04 15:18:42 +02:00
Michael Simons
0d548e735a Don’t try to developed against Data or Boot snapshots.
It’s to brittle and stuff breaks everytime when situations are really bad for it. I start to appreciate Neo4js „we don’t do snapshots mentality.“.
2019-04-03 13:17:35 +02:00