Skip to content

Commit a27b853

Browse files
Merge branch 'develop' into update-from-template
2 parents 608d9cd + 4e7b481 commit a27b853

File tree

235 files changed

+16329
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+16329
-54
lines changed

.github/workflows/checkBuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
strategy:
2929
matrix:
30-
java: [17, 21]
30+
java: [17, 21.0.1]
3131
distribution: [temurin]
3232

3333
steps:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ target/
6666
.flattened-pom.xml
6767
.tern-project
6868

69+
# EclipseStore
70+
storage
71+
storage-jpa
72+
6973
# == IntelliJ ==
7074
*.iml
7175
*.ipr

.run/Run Benchmark.run.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Run Benchmark" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.benchmark.BenchmarkRunner" />
4+
<module name="spring-data-eclipse-store-benchmark" />
5+
<option name="VM_PARAMETERS" value="--add-opens java.base/java.util=ALL-UNNAMED" />
6+
<extension name="coverage">
7+
<pattern>
8+
<option name="PATTERN" value="software.xdev.spring.data.eclipse.store.benchmark.benchmarks.simple.user.*" />
9+
<option name="ENABLED" value="true" />
10+
</pattern>
11+
</extension>
12+
<method v="2">
13+
<option name="Make" enabled="true" />
14+
</method>
15+
</configuration>
16+
</component>

.run/Run Complex Demo.run.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Run Complex Demo" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.complex.ComplexDemoApplication" />
4+
<module name="spring-data-eclipse-store-demo" />
5+
<option name="VM_PARAMETERS" value="--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED" />
6+
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
7+
<extension name="coverage">
8+
<pattern>
9+
<option name="PATTERN" value="software.xdev.*" />
10+
<option name="ENABLED" value="true" />
11+
</pattern>
12+
</extension>
13+
<method v="2">
14+
<option name="Make" enabled="true" />
15+
</method>
16+
</configuration>
17+
</component>

.run/Run Demo.run.xml renamed to .run/Run JPA Demo.run.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
3-
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="standard-maven-template-demo" />
2+
<configuration default="false" name="Run JPA Demo" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.jpa.JpaDemoApplication" />
4+
<module name="spring-data-eclipse-store-jpa" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

.run/Run Simple Demo.run.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="Run Simple Demo" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.simple.SimpleDemoApplication" />
4+
<module name="spring-data-eclipse-store-demo" />
5+
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
6+
<extension name="coverage">
7+
<pattern>
8+
<option name="PATTERN" value="software.xdev.*" />
9+
<option name="ENABLED" value="true" />
10+
</pattern>
11+
</extension>
12+
<method v="2">
13+
<option name="Make" enabled="true" />
14+
</method>
15+
</configuration>
16+
</component>

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 1.0.1
2+
3+
* Fix for NullPointerException when storing an entity with Auto-ID and no previous action on the database.
4+
* Provide multiple Repository Interfaces, not only EclipseStoreRepository (e.g. EclipseStoreCrudRepository).
5+
6+
# 1.0.0
7+
8+
* Initial release
9+

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ You should have the following things installed:
3333
* Ensure that the JDK/Java-Version is correct
3434

3535

36-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/standard-maven-template/release.yml?branch=master)](https://github.com/xdev-software/standard-maven-template/actions/workflows/release.yml)
36+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/release.yml?branch=master)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/release.yml)
3737

3838
Before releasing:
39-
* Consider doing a [test-deployment](https://github.com/xdev-software/standard-maven-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
39+
* Consider doing a [test-deployment](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4040
* Check the [changelog](CHANGELOG.md)
4141

4242
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,96 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/standard-maven-template?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/standard-maven-template)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/standard-maven-template/checkBuild.yml?branch=develop)](https://github.com/xdev-software/standard-maven-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_standard-maven-template&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_standard-maven-template)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/spring-data-eclipse-store?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/spring-data-eclipse-store)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-data-eclipse-store/checkBuild.yml?branch=develop)](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/checkBuild.yml?query=branch%3Adevelop)
3+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_spring-data-eclipse-store&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_spring-data-eclipse-store)
44

5-
# standard-maven-template
5+
<div align="center">
6+
<img src="assets/Logo.png" height="200" alt="XDEV Spring-Data Eclipse-Store Logo">
7+
</div>
68

9+
# spring-data-eclipse-store
10+
11+
A library to simplify using [EclipseStore](https://eclipsestore.io/) in the [Spring environment](https://spring.io/projects/spring-data/).
12+
13+
What makes this library special is, that it creates a working copy of the data.
14+
This way EclipseStore behaves almost exactly like relational database from a coding perspective.
15+
16+
## Features
17+
18+
The library provides following features:
19+
20+
* Enforces the
21+
**[Spring data repository concept](https://docs.spring.io/spring-data/jpa/reference/repositories/core-concepts.html)**
22+
for EclipseStore by using [working copies](#working-copies)
23+
* **[Drop in compatible](#usage)** for your existing Spring application
24+
* Utilizes **ultra-fast EclipseStore serializing and storing**
25+
* Enables your application to **select
26+
any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (e.g.
27+
[PostgreSQL](https://docs.eclipsestore.io/manual/storage/storage-targets/sql-databases/postgresql.html),
28+
[AWS S3](https://docs.eclipsestore.io/manual/storage/storage-targets/blob-stores/aws-s3.html) or
29+
[IBM COS](https://github.com/xdev-software/eclipse-store-afs-ibm-cos))
30+
* Can save up to **99%[^1] of monthly costs** in the IBM Cloud and up to 82%[^2] in the AWS Cloud
31+
32+
[^1]:If the COS Connector is used in the IBM Cloud instead of a PostgreSQL and approx. 10,000 entries with a total size
33+
of 1
34+
GB of data are stored. ([IBM Cloud Pricing](https://cloud.ibm.com/estimator/estimates), as of 08.01.2024)
35+
36+
[^2]: If the S3 connector is used instead of DynamoDB under the same conditions at
37+
AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0d1aa0457111ed82785dfb836b1d8), as of
38+
08.01.2024)
39+
40+
### Working copies
41+
42+
If you use EclipseStore without our library, EclipseStore loads the data from the datastore directly into memory. You make your changes on these loaded Java objects and by calling ``store`` EclipseStore writes it directly from memory to the datastore.
43+
44+
![Native behavior of EclipseStore](assets/WorkingCopy_1.svg)
45+
46+
If you e.g. change the address of a person, the changed address is already in your data model, **even before storing** this person.
47+
This is very different from the behavior a Spring user expects.
48+
49+
With *Spring-Data-Eclipse-Store* every time an object is loaded from the datastore, a working copy of that object (or rather the object tree) is created and returned to the user. Therefore, the user can make the changes on the working copy without any changes to the actual data model. The changes are only persisted after calling ``save`` on a repository.
50+
51+
![Behavior of EclipseStore with Spring-Data-Eclipse-Store](assets/WorkingCopy_2.svg)
752

853
## Installation
9-
[Installation guide for the latest release](https://github.com/xdev-software/standard-maven-template/releases/latest#Installation)
54+
[Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation)
55+
56+
### Prerequisites
57+
58+
| | Minimal Version |
59+
|--------------|-----------------|
60+
| Java | ``17`` |
61+
| Spring Data | ``3.2.2`` |
62+
| EclipseStore | ``1.1.0`` |
63+
64+
### Usage
65+
66+
After adding the library in your dependencies, using it is as easy as adding the ``@EnableEclipseStoreRepositories`` annotation to your ``@SpringBootApplication`` annotation.
67+
68+
## Demo
69+
70+
To see how easy it is to implement EclipseStore in your Spring project, take a look at the three
71+
[demos](./spring-data-eclipse-store-demo):<br/>
72+
A [simple](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple), a
73+
more [complex demo](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex)
74+
and
75+
a [demo with coexisting JPA](./spring-data-eclipse-store-jpa/src/main/java/software/xdev/spring/data/eclipse/store/jpa).
76+
77+
> [!NOTE]
78+
> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set:
79+
> ```
80+
> --add-opens=java.base/java.util=ALL-UNNAMED
81+
> --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
82+
> --add-opens=java.base/java.lang=ALL-UNNAMED
83+
> --add-opens=java.base/java.time=ALL-UNNAMED
84+
> ```
1085
1186
1287
## Support
13-
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
88+
89+
If you need support as soon as possible, and you can't wait for any pull request, feel free to
90+
use [our support](https://xdev.software/en/services/support).
1491
1592
## Contributing
1693
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1794
1895
## Dependencies and Licenses
19-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/standard-maven-template/dependencies/)
96+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/spring-data-eclipse-store/dependencies/)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/standard-maven-template/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/spring-data-eclipse-store/security/advisories/new).

assets/Logo.png

45.2 KB
Loading

0 commit comments

Comments
 (0)