Skip to content

Commit fbc1129

Browse files
Merge branch 'develop' into update-from-template
2 parents 5a006a9 + d90c6cb commit fbc1129

File tree

185 files changed

+3950
-478
lines changed

Some content is hidden

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

185 files changed

+3950
-478
lines changed

.github/workflows/antora-build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Antora Documentation Build
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
ACTIONS_STEP_DEBUG : true
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read # Read permission for repository contents
12+
pages: write # Write permission for GitHub Pages
13+
id-token: write # Write permission for ID token
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
environment:
20+
name: github-pages
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Install Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 18
30+
31+
- name: Install Antora and the Antora Lunr Extension
32+
run: npm i antora @antora/lunr-extension
33+
34+
- name: Generate Site
35+
run: npx antora docs/antora-playbook.yml
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
name: site
44+
path: docs/site
45+
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4
49+
with:
50+
token: ${{ secrets.GITHUB_TOKEN }}
51+
artifact_name: site

.github/workflows/checkBuild.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
strategy:
3131
matrix:
32-
java: [17, 21.0.1]
32+
java: [17, 21]
3333
distribution: [temurin]
3434

3535
steps:
@@ -90,3 +90,20 @@ jobs:
9090

9191
- name: Run Checkstyle
9292
run: ./mvnw -B checkstyle:check -P checkstyle -T2C
93+
94+
docs:
95+
runs-on: ubuntu-latest
96+
97+
steps:
98+
- uses: actions/checkout@v4
99+
100+
- name: Install Node.js
101+
uses: actions/setup-node@v4
102+
with:
103+
node-version: 18
104+
105+
- name: Install Antora and the Antora Lunr Extension
106+
run: npm i antora @antora/lunr-extension
107+
108+
- name: Generate Site
109+
run: npx antora docs/antora-playbook.yml

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ target/
6868

6969
# EclipseStore
7070
storage
71+
storage-person
72+
storage-invoice
7173
storage-jpa
7274

7375
# == IntelliJ ==

.run/Run Dual Storage 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 Dual Storage Demo" type="Application" factoryName="Application">
3+
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.dual.storage.DualStorageDemoApplication" />
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 --add-exports java.base/jdk.internal.misc=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>

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# 1.0.4
2+
3+
* Added possibility to use multiple storages
4+
5+
# 1.0.3
6+
7+
* Added the EclipseStoreDataImporter to import data from JPA repositories.
8+
* Updated EclipseStore to version 1.2.0
9+
* Updated Spring to version 3.2.3
10+
11+
# 1.0.2
12+
13+
* Added the EclipseStoreCustomRepository which has no methods defined at all.
14+
* EclipseStoreRepository extends the Crud- and PagingAndSorting-Repository (just like the
15+
org.springframework.data.jpa.repository.JpaRepository).
16+
117
# 1.0.1
218

319
* Fix for NullPointerException when storing an entity with Auto-ID and no previous action on the database.

README.md

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ The library provides following features:
1919

2020
* Enforces the
2121
**[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
22+
for EclipseStore by
23+
using [working copies](https://xdev-software.github.io/spring-data-eclipse-store/working-copies.html)
24+
* **[Drop in compatible](https://xdev-software.github.io/spring-data-eclipse-store/installation.html#drop-in-compatible)** for your existing Spring application
2425
* Utilizes **ultra-fast EclipseStore serializing and storing**
2526
* Enables your application to **select
2627
any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (e.g.
@@ -37,42 +38,30 @@ GB of data are stored. ([IBM Cloud Pricing](https://cloud.ibm.com/estimator/esti
3738
AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0d1aa0457111ed82785dfb836b1d8), as of
3839
08.01.2024)
3940

40-
### Working copies
41+
## Installation & Usage
4142

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+
[**Installation
44+
guide** for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation)
4345

44-
![Native behavior of EclipseStore](assets/WorkingCopy_1.svg)
46+
[**Detailed
47+
instructions** are in the documentation](https://xdev-software.github.io/spring-data-eclipse-store/installation.html)
4548

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.
49+
### Supported versions
4850

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)
52-
53-
## 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.
51+
| Spring-Data-Eclipse-Store | Java | Spring Data | EclipseStore |
52+
|---------------------------|--------|-------------|--------------|
53+
| ``<= 1.0.2`` | ``17`` | ``3.2.2`` | ``1.1.0`` |
54+
| ``1.0.3`` | ``17`` | ``3.2.3`` | ``1.2.0`` |
6755

6856
## Demo
6957

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).
58+
To see how easy it is to implement EclipseStore in your Spring project, take a look at
59+
the [demos](./spring-data-eclipse-store-demo):
60+
61+
* [Simple demo](https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple)
62+
* [Complex demo](https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex)
63+
* [Demo with coexisting JPA](https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store-jpa/src/main/java/software/xdev/spring/data/eclipse/store/jpa)
64+
* [Dual storage demo](https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/dual/storage)
7665

7766
> [!NOTE]
7867
> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set:
@@ -83,7 +72,6 @@ a [demo with coexisting JPA](./spring-data-eclipse-store-jpa/src/main/java/softw
8372
> --add-opens=java.base/java.time=ALL-UNNAMED
8473
> ```
8574
86-
8775
## Support
8876
8977
If you need support as soon as possible, and you can't wait for any pull request, feel free to

docs/antora-playbook.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
site:
2+
title: Spring-Data-Eclipse-Store
3+
url: https://spring-eclipsestore.xdev.software/
4+
robots: allow
5+
6+
# see https://docs.antora.org/antora/2.3/playbook/configure-runtime/
7+
runtime:
8+
cache_dir: ./.cache/antora
9+
log:
10+
# use pretty even on CI
11+
format: pretty
12+
# set to info to get details from the Antora extensions
13+
level: info
14+
# Antora exits with a non-zero exit code if an error is logged -> https://docs.antora.org/antora/latest/playbook/runtime-log-failure-level
15+
failure_level: error
16+
17+
content:
18+
sources:
19+
# url of the repo
20+
- url: https://github.com/xdev-software/spring-data-eclipse-store
21+
start_path: docs
22+
branches:
23+
- "develop"
24+
25+
ui:
26+
bundle:
27+
url: https://gitlab.com/antora/antora-ui-default/-/jobs/artifacts/master/raw/build/ui-bundle.zip?job=bundle-stable
28+
snapshot: true
29+
supplemental_files: ./supplemental-ui
30+
31+
output:
32+
dir: ./site
33+
34+
antora:
35+
extensions:
36+
- require: '@antora/lunr-extension'

docs/antora.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: ROOT
2+
title: Spring-Data-Eclipse-Store
3+
version: master
4+
display_version: '1.0.3'
5+
start_page: index.adoc
6+
nav:
7+
- modules/ROOT/nav.adoc
8+
asciidoc:
9+
attributes:
10+
product-name: 'Spring-Data-Eclipse-Store'
11+
display-version: '1.0.3'
12+
maven-version: '1.0.3'
13+
page-editable: false
14+
page-out-of-support: false
Lines changed: 1 addition & 0 deletions
Loading

docs/modules/ROOT/nav.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* xref:index.adoc[Home]
2+
* xref:installation.adoc[Installation]
3+
* xref:configuration.adoc[Configuration]
4+
* xref:working-copies.adoc[Working Copies]
5+
* xref:migration.adoc[Migration]
6+
* xref:known-issues.adoc[Known issues]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
= Configuration
2+
3+
== EclipseStore Spring-Boot Configuration
4+
5+
The simplest way to configure your storage is by using the key/value pairs in a configuration file as described in the https://docs.eclipsestore.io/manual/misc/integrations/spring-boot.html[EclipseStore documentation].
6+
7+
== Detailed Configuration
8+
9+
If you need more control or want to configure your storage in code, we provide a simple Configuration class which can be used as follows:
10+
11+
[source,java,title="Demo configuration"]
12+
----
13+
import org.eclipse.store.storage.embedded.types.EmbeddedStorage;
14+
import org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation;
15+
import org.eclipse.store.storage.types.Storage;
16+
...
17+
@Configuration
18+
@EnableEclipseStoreRepositories(clientConfigurationClass = DemoConfiguration.class)
19+
public class DemoConfiguration extends EclipseStoreClientConfiguration
20+
{
21+
@Override
22+
public EmbeddedStorageFoundation<?> createEmbeddedStorageFoundation()
23+
{
24+
return EmbeddedStorage.Foundation(Storage.Configuration(Storage.FileProvider(Path.of("demo-storage"))));
25+
}
26+
}
27+
----
28+
The method ``createEmbeddedStorageFoundation`` could return a much more complicated ``EmbeddedStorageFoundation`` as described here in the https://docs.eclipsestore.io/manual/storage/configuration/index.html[EclipseStore documentation about configuration and foundations].
29+
30+
This also enables you to use multiple EclipseStore-Storages in one project. See the https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/dual/storage[Dual storages demo].

0 commit comments

Comments
 (0)