Skip to content

Release #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0983564
Rename
AB-xdev Jan 23, 2024
7042fcf
Rename
AB-xdev Jan 23, 2024
3f96b82
Create markdown files and Readme
AB-xdev Jan 23, 2024
59758ff
Update README.md
AB-xdev Jan 23, 2024
f172f3c
Add initial code
AB-xdev Jan 23, 2024
f7b75f2
Fix checkstyle
AB-xdev Jan 23, 2024
dc62f5a
Improve deprecation
AB-xdev Jan 23, 2024
2d7b628
Add benchmark
AB-xdev Jan 23, 2024
64a2149
Update .gitignore
AB-xdev Jan 23, 2024
4351116
Add run configurations
AB-xdev Jan 23, 2024
c312e82
Update release.yml
AB-xdev Jan 23, 2024
2173afd
Changed README Images to SVG
JohannesRabauer Jan 23, 2024
29aadc0
Update release.yml
AB-xdev Jan 23, 2024
b899426
Cleaned up dependencies with bom
JohannesRabauer Jan 23, 2024
3bb4346
Ignore multi lines
AB-xdev Jan 23, 2024
127f49a
Merge pull request #21 from xdev-software/unlimited-modules-in-release
AB-xdev Jan 23, 2024
8784ee2
Use tabs for xml files
AB-xdev Jan 23, 2024
e7390d3
Merge pull request #22 from xdev-software/update-from-template
AB-xdev Jan 23, 2024
ef752d0
Merge branch 'ab-update-from-template' into develop
AB-xdev Jan 23, 2024
fefc9d8
First tests with Java 21
JohannesRabauer Jan 23, 2024
83568ba
Bump org.springframework.data:spring-data-commons from 3.2.1 to 3.2.2
dependabot[bot] Jan 24, 2024
64b8cf3
Bump org.slf4j:slf4j-api from 2.0.9 to 2.0.11
dependabot[bot] Jan 24, 2024
2624df3
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.1.2 to 3.2.5
dependabot[bot] Jan 24, 2024
ab19e7d
Bump org.apache.logging.log4j:log4j-slf4j2-impl from 2.22.0 to 2.22.1
dependabot[bot] Jan 24, 2024
824b4b7
Bump org.apache.logging.log4j:log4j-core from 2.22.0 to 2.22.1
dependabot[bot] Jan 24, 2024
676e718
Bump org.springframework.boot:spring-boot-autoconfigure
dependabot[bot] Jan 24, 2024
16f63ce
Bump org.apache.logging.log4j:log4j-api from 2.22.0 to 2.22.1
dependabot[bot] Jan 24, 2024
b483371
Tests for final modifier
JohannesRabauer Jan 24, 2024
0378316
Writing final fields per reflection is not possible anymore
JohannesRabauer Jan 24, 2024
a60b508
IdentitySet fix
JohannesRabauer Jan 24, 2024
8a0d905
Minor fix
JohannesRabauer Jan 25, 2024
5e7bb5d
Added Record tests
JohannesRabauer Jan 25, 2024
99ff619
Cleanup
JohannesRabauer Jan 25, 2024
d4dfbd5
Update README.md
JohannesRabauer Jan 25, 2024
aeb60f3
Updated to 1.1.0 of eclipse store
JohannesRabauer Jan 25, 2024
a14178a
Bump junit-jupiter.version from 5.8.1 to 5.10.1
dependabot[bot] Jan 25, 2024
a5620de
Merge pull request #9 from xdev-software/dependabot/maven/org.apache.…
JohannesRabauer Jan 25, 2024
3b836bf
Merge pull request #8 from xdev-software/dependabot/maven/org.springf…
JohannesRabauer Jan 25, 2024
87633f2
Merge pull request #7 from xdev-software/dependabot/maven/org.apache.…
JohannesRabauer Jan 25, 2024
0f9306d
Merge pull request #6 from xdev-software/dependabot/maven/org.apache.…
JohannesRabauer Jan 25, 2024
f4c7186
Merge pull request #1 from xdev-software/dependabot/maven/org.springf…
JohannesRabauer Jan 25, 2024
a1723af
Merge pull request #2 from xdev-software/dependabot/maven/org.slf4j-s…
JohannesRabauer Jan 25, 2024
53b71c6
Merge pull request #3 from xdev-software/dependabot/maven/junit-jupit…
JohannesRabauer Jan 25, 2024
f289dd5
Merge pull request #5 from xdev-software/dependabot/maven/org.apache.…
JohannesRabauer Jan 25, 2024
a69cfdf
Bump org.springframework:spring-test from 5.3.3 to 6.1.3
dependabot[bot] Jan 25, 2024
1ca4d35
Update README.md
JohannesRabauer Jan 25, 2024
7777fe6
Merge pull request #4 from xdev-software/dependabot/maven/org.springf…
JohannesRabauer Jan 25, 2024
6fa7341
Cleanup dependencies
AB-xdev Jan 25, 2024
f33067b
Fix sonar warnings
AB-xdev Jan 25, 2024
b9e9dae
Sonar: Skip tests
AB-xdev Jan 25, 2024
af0a7cf
Merge pull request #11 from xdev-software/update-from-template
AB-xdev Jan 25, 2024
c59a8a3
Add and fix tests for removing all inherited objects
JohannesRabauer Jan 25, 2024
2e1943b
Minor fixes
JohannesRabauer Jan 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

env:
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo

permissions:
contents: write
Expand Down Expand Up @@ -58,17 +57,16 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Un-SNAP root
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false

- name: Un-SNAP demo
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
- name: Un-SNAP
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
run: |
modules=("") # root
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
for i in "${modules[@]}"
do
echo "Processing $i/pom.xml"
(cd "$i" && mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
done
- name: Get version
id: version
Expand Down Expand Up @@ -204,17 +202,16 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull
- name: Inc Version and SNAP root
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true

- name: Inc Version and SNAP demo
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
working-directory: ${{ env.DEMO_MAVEN_MODULE }}

- name: Inc Version and SNAP
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
run: |
modules=("") # root
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
for i in "${modules[@]}"
do
echo "Processing $i/pom.xml"
(cd "$i" && mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true)
done
- name: Git Commit and Push
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} -Dsonar.organization=${{ env.SONARCLOUD_ORG }} -Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
run: |
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
-DskipTests \
-Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} \
-Dsonar.organization=${{ env.SONARCLOUD_ORG }} \
-Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ target/
.flattened-pom.xml
.tern-project

# EclipseStore
storage

# == IntelliJ ==
*.iml
*.ipr
Expand Down
5 changes: 5 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .run/Run Benchmark.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Benchmark" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.benchmark.BenchmarkRunner" />
<module name="spring-data-eclipse-store-benchmark" />
<option name="VM_PARAMETERS" value="--add-opens java.base/java.util=ALL-UNNAMED" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="software.xdev.spring.data.eclipse.store.benchmark.benchmarks.simple.user.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
17 changes: 17 additions & 0 deletions .run/Run Complex Demo.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Complex Demo" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.complex.ComplexDemoApplication" />
<module name="spring-data-eclipse-store-demo" />
<option name="VM_PARAMETERS" value="--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="software.xdev.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
6 changes: 3 additions & 3 deletions .run/Run Demo.run.xml → .run/Run Simple Demo.run.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
<module name="standard-maven-template-demo" />
<configuration default="false" name="Run Simple Demo" type="Application" factoryName="Application">
<option name="MAIN_CLASS_NAME" value="software.xdev.spring.data.eclipse.store.demo.simple.SimpleDemoApplication" />
<module name="spring-data-eclipse-store-demo" />
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
<extension name="coverage">
<pattern>
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 1.0.0
* Initial release
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ You should have the following things installed:
* Ensure that the JDK/Java-Version is correct


## 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)
## 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)

Before releasing:
* Consider doing a [test-deployment](https://github.com/xdev-software/standard-maven-template/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
* 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.
* Check the [changelog](CHANGELOG.md)

If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes
Expand Down
90 changes: 83 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,95 @@
[![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)
[![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)
[![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)
[![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)
[![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)
[![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)

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

# spring-data-eclipse-store

A library to simplify using [EclipseStore](https://eclipsestore.io/) in the [Spring environment](https://spring.io/projects/spring-data/).

What makes this library special is, that it creates a working copy of the data.
This way EclipseStore behaves almost exactly like relational database from a coding perspective.

## Features

The library provides following features:

* Enforces the
**[Spring data repository concept](https://docs.spring.io/spring-data/jpa/reference/repositories/core-concepts.html)**
for EclipseStore by using [working copies](#working-copies)
* **[Drop in compatible](#usage)** for your existing Spring application
* Utilizes **ultra-fast EclipseStore serializing and storing**
* Enables your application to **select
any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (e.g.
[PostgreSQL](https://docs.eclipsestore.io/manual/storage/storage-targets/sql-databases/postgresql.html),
[AWS S3](https://docs.eclipsestore.io/manual/storage/storage-targets/blob-stores/aws-s3.html) or
[IBM COS](https://github.com/xdev-software/eclipse-store-afs-ibm-cos))
* Can save up to **99%[^1] of monthly costs** in the IBM Cloud and up to 82%[^2] in the AWS Cloud

[^1]:If the COS Connector is used in the IBM Cloud instead of a PostgreSQL and approx. 10,000 entries with a total size
of 1
GB of data are stored. ([IBM Cloud Pricing](https://cloud.ibm.com/estimator/estimates), as of 08.01.2024)

[^2]: If the S3 connector is used instead of DynamoDB under the same conditions at
AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0d1aa0457111ed82785dfb836b1d8), as of
08.01.2024)

### Working copies

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.

![Native behavior of EclipseStore](assets/WorkingCopy_1.svg)

If you e.g. change the address of a person, the changed address is already in your data model, **even before storing** this person.
This is very different from the behavior a Spring user expects.

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.

![Behavior of EclipseStore with Spring-Data-Eclipse-Store](assets/WorkingCopy_2.svg)

## Installation
[Installation guide for the latest release](https://github.com/xdev-software/standard-maven-template/releases/latest#Installation)
[Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation)

### Prerequisites

| | Minimal Version |
|--------------|-----------------|
| Java | ``17`` |
| Spring Data | ``3.2.2`` |
| EclipseStore | ``1.1.0`` |

### Usage

After adding the library in your dependencies, using it is as easy as adding the ``@EnableEclipseStoreRepositories`` annotation to your ``@SpringBootApplication`` annotation.

## Demo

To see how easy it is to implement EclipseStore in your Spring project, take a look at the two
[demos](./spring-data-eclipse-store-demo):<br/>
A [simple](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple)
and a
more [complex demo](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex).

> [!NOTE]
> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set:
> ```
> --add-opens=java.base/java.util=ALL-UNNAMED
> --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
> --add-opens=java.base/java.lang=ALL-UNNAMED
> --add-opens=java.base/java.time=ALL-UNNAMED
> ```


## Support
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).

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).

## Contributing
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.

## Dependencies and Licenses
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/standard-maven-template/dependencies/)
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/spring-data-eclipse-store/dependencies/)
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Reporting a Vulnerability

Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/standard-maven-template/security/advisories/new).
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/spring-data-eclipse-store/security/advisories/new).
Binary file added assets/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading