Skip to content

Commit 2c02188

Browse files
Merge pull request #201 from xdev-software/develop
v2.4.0
2 parents 0d62855 + 30256d8 commit 2c02188

File tree

114 files changed

+2649
-265
lines changed

Some content is hidden

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

114 files changed

+2649
-265
lines changed

.config/pmd/ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,12 @@
151151
<exclude name="UseStringBufferForStringAppends"/>
152152
</rule>
153153

154+
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch">
155+
<properties>
156+
<!-- If you have one case only please use a if -->
157+
<property name="minimumNumberCaseForASwitch" value="2"/>
158+
</properties>
159+
</rule>
160+
154161
<rule ref="category/java/security.xml"/>
155162
</ruleset>

.github/workflows/broken-links.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
jobs:
1212
link-checker:
1313
runs-on: ubuntu-latest
14+
timeout-minutes: 15
1415
steps:
1516
- uses: actions/checkout@v4
1617

@@ -19,6 +20,8 @@ jobs:
1920
- name: Link Checker
2021
id: lychee
2122
uses: lycheeverse/lychee-action@v2
23+
with:
24+
fail: false # Don't fail on broken links, create an issue instead
2225

2326
- name: Find already existing issue
2427
id: find-issue

.github/workflows/check-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ env:
2626
jobs:
2727
build:
2828
runs-on: ubuntu-latest
29+
timeout-minutes: 30
2930

3031
strategy:
3132
matrix:
@@ -73,6 +74,7 @@ jobs:
7374
checkstyle:
7475
runs-on: ubuntu-latest
7576
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
77+
timeout-minutes: 15
7678

7779
strategy:
7880
matrix:
@@ -95,6 +97,7 @@ jobs:
9597
pmd:
9698
runs-on: ubuntu-latest
9799
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
100+
timeout-minutes: 15
98101

99102
strategy:
100103
matrix:
@@ -114,9 +117,6 @@ jobs:
114117
- name: Run PMD
115118
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C
116119

117-
- name: Run CPD (Copy Paste Detector)
118-
run: ./mvnw -B pmd:aggregate-cpd pmd:cpd-check -P pmd -DskipTests -T2C
119-
120120
- name: Upload report
121121
if: always()
122122
uses: actions/upload-artifact@v4

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
check-code:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 30
1718
steps:
1819
- uses: actions/checkout@v4
1920

@@ -48,6 +49,7 @@ jobs:
4849
prepare-release:
4950
runs-on: ubuntu-latest
5051
needs: [check-code]
52+
timeout-minutes: 10
5153
outputs:
5254
upload_url: ${{ steps.create_release.outputs.upload_url }}
5355
steps:
@@ -109,6 +111,7 @@ jobs:
109111
publish-maven:
110112
runs-on: ubuntu-latest
111113
needs: [prepare-release]
114+
timeout-minutes: 60
112115
steps:
113116
- uses: actions/checkout@v4
114117

@@ -140,6 +143,7 @@ jobs:
140143
publish-pages:
141144
runs-on: ubuntu-latest
142145
needs: [prepare-release]
146+
timeout-minutes: 15
143147
steps:
144148
- uses: actions/checkout@v4
145149

@@ -169,6 +173,7 @@ jobs:
169173
after-release:
170174
runs-on: ubuntu-latest
171175
needs: [publish-maven]
176+
timeout-minutes: 10
172177
steps:
173178
- uses: actions/checkout@v4
174179

.github/workflows/sonar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
token-check:
2828
runs-on: ubuntu-latest
2929
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
30+
timeout-minutes: 5
3031
outputs:
3132
hasToken: ${{ steps.check-token.outputs.has }}
3233
steps:
@@ -40,6 +41,7 @@ jobs:
4041
runs-on: ubuntu-latest
4142
needs: token-check
4243
if: ${{ needs.token-check.outputs.hasToken }}
44+
timeout-minutes: 30
4345
steps:
4446
- uses: actions/checkout@v4
4547
with:

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
labels:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 10
1718
steps:
1819
- uses: actions/checkout@v4
1920
with:

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
jobs:
1010
publish-maven:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 60
1213
steps:
1314
- uses: actions/checkout@v4
1415

.github/workflows/update-from-template.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ permissions:
3131
jobs:
3232
update:
3333
runs-on: ubuntu-latest
34+
timeout-minutes: 60
3435
outputs:
3536
update_branch_merged_commit: ${{ steps.manage-branches.outputs.update_branch_merged_commit }}
3637
create_update_branch_merged_pr: ${{ steps.manage-branches.outputs.create_update_branch_merged_pr }}
@@ -180,6 +181,7 @@ jobs:
180181
needs: [update]
181182
if: needs.update.outputs.create_update_branch_merged_pr == 1
182183
runs-on: ubuntu-latest
184+
timeout-minutes: 60
183185
steps:
184186
- uses: actions/checkout@v4
185187
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ spring-data-eclipse-store-demo/storage
6767
spring-data-eclipse-store-demo/storage-person
6868
spring-data-eclipse-store-demo/storage-invoice
6969
spring-data-eclipse-store-demo/storage-complex
70+
spring-data-eclipse-store-demo/storage-lazy
7071
spring-data-eclipse-store-jpa/storage-eclipsestore
7172
spring-data-eclipse-store-jpa/storage-h2.mv.db
7273
spring-data-eclipse-store-jpa/storage-h2.trace.db

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 2.4.0
2+
3+
* Updated org.springframework.boot.version to v3.4.0
4+
* Updated EclipseStore to v2.0.0
5+
* Implemented Lazy Repositories with ``LazyEclipseStoreRepository``
6+
17
# 2.3.1
28

39
* Auto-Fix problems with adding ids to entities with existing data store.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ instructions** are in the documentation](https://xdev-software.github.io/spring-
5656
| ``1.0.5-1.0.7`` | ``17`` | ``3.2.5`` | ``1.3.2`` |
5757
| ``1.0.8-1.0.10`` | ``17`` | ``3.3.1`` | ``1.3.2`` |
5858
| ``2.0.0-2.1.0`` | ``17`` | ``3.3.2`` | ``1.4.0`` |
59-
| ``>= 2.2.0`` | ``17`` | ``3.3.4`` | ``1.4.0`` |
59+
| ``2.2.0-2.3.1`` | ``17`` | ``3.3.4`` | ``1.4.0`` |
60+
| ``>= 2.4.0`` | ``17`` | ``3.4.0`` | ``2.0.0`` |
6061

6162
## Demo
6263

@@ -65,6 +66,7 @@ the [demos](./spring-data-eclipse-store-demo):
6566

6667
* [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)
6768
* [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)
69+
* [Lazy 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/lazy)
6870
* [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)
6971
* [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)
7072

docs/antora.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: ROOT
22
title: Spring-Data-Eclipse-Store
33
version: master
4-
display_version: '2.3.1'
4+
display_version: '2.4.0'
55
start_page: index.adoc
66
nav:
77
- modules/ROOT/nav.adoc
88
asciidoc:
99
attributes:
1010
product-name: 'Spring-Data-Eclipse-Store'
11-
display-version: '2.3.1'
12-
maven-version: '2.3.1'
11+
display-version: '2.4.0'
12+
maven-version: '2.4.0'
1313
page-editable: false
1414
page-out-of-support: false

docs/modules/ROOT/pages/features/lazies.adoc

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,38 @@ public class Owner extends Person
2727
{
2828
private String address;
2929
30-
private Lazy<List<Pet>> pets = SpringDataEclipseStoreLazy.build(new ArrayList<>());
30+
private final Lazy<List<Pet>> pets = SpringDataEclipseStoreLazy.build(new ArrayList<>());
3131
//...
3232
----
3333

34+
== Repositories
35+
36+
Entities in a repository are by default **not lazy**.
37+
But we made it as easy as possible for you to make these entities lazy: Instead of extending the ``EclipseStoreRepository`` (or any similar class from the ``software.xdev.spring.data.eclipse.store.repository.interfaces``-Package), you simply extend the ``LazyEclipseStoreRepository``.
38+
39+
=== 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/lazy/CustomerRepository.java[Example from lazy demo]
40+
41+
[source,java,title="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/CustomerRepository.java[Before (not lazy)]"]
42+
----
43+
public interface CustomerRepository extends CrudRepository<Customer, String>
44+
{
45+
}
46+
----
47+
48+
[source,java,title="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/lazy/CustomerRepository.java[After (lazy)]"]
49+
----
50+
public interface CustomerRepository extends LazyEclipseStoreCrudRepository<Customer, String>
51+
{
52+
}
53+
----
54+
55+
Every instance of the ``Customer``-Entities are now wrapped in a https://docs.eclipsestore.io/manual/storage/loading-data/lazy-loading/index.html[``Lazy``-Reference].
56+
That means that these objects are **only loaded from the storage, if they are needed** e.g. when ``findAll`` is called.
57+
58+
The method **``findById`` only loads the entities with the corresponding IDs**, because a separate list with all ids is stored.
59+
But if any method like **``findByName`` or ``findByChild`` is used, all objects are loaded** from the storage.
60+
This is currently the only way to get the actual values of the entities.
61+
3462
== Internals
3563

3664
SpringDataEclipseStoreLazies work as a proxy for the EclipseStore-Lazies.

docs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"@antora/lunr-extension": "^1.0.0-alpha.8"
44
},
55
"devDependencies": {
6-
"@antora/cli": "3.1.9",
7-
"@antora/site-generator": "3.1.9"
6+
"@antora/cli": "3.1.10",
7+
"@antora/site-generator": "3.1.10"
88
}
99
}

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>spring-data-eclipse-store-root</artifactId>
9-
<version>2.3.2-SNAPSHOT</version>
9+
<version>2.4.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -45,12 +45,12 @@
4545
<plugin>
4646
<groupId>org.apache.maven.plugins</groupId>
4747
<artifactId>maven-checkstyle-plugin</artifactId>
48-
<version>3.5.0</version>
48+
<version>3.6.0</version>
4949
<dependencies>
5050
<dependency>
5151
<groupId>com.puppycrawl.tools</groupId>
5252
<artifactId>checkstyle</artifactId>
53-
<version>10.18.2</version>
53+
<version>10.20.2</version>
5454
</dependency>
5555
</dependencies>
5656
<configuration>
@@ -75,7 +75,7 @@
7575
<plugin>
7676
<groupId>org.apache.maven.plugins</groupId>
7777
<artifactId>maven-pmd-plugin</artifactId>
78-
<version>3.25.0</version>
78+
<version>3.26.0</version>
7979
<configuration>
8080
<includeTests>true</includeTests>
8181
<printFailingErrors>true</printFailingErrors>
@@ -93,12 +93,12 @@
9393
<dependency>
9494
<groupId>net.sourceforge.pmd</groupId>
9595
<artifactId>pmd-core</artifactId>
96-
<version>7.6.0</version>
96+
<version>7.8.0</version>
9797
</dependency>
9898
<dependency>
9999
<groupId>net.sourceforge.pmd</groupId>
100100
<artifactId>pmd-java</artifactId>
101-
<version>7.6.0</version>
101+
<version>7.8.0</version>
102102
</dependency>
103103
</dependencies>
104104
</plugin>
@@ -110,7 +110,7 @@
110110
<plugin>
111111
<groupId>org.apache.maven.plugins</groupId>
112112
<artifactId>maven-jxr-plugin</artifactId>
113-
<version>3.5.0</version>
113+
<version>3.6.0</version>
114114
</plugin>
115115
</plugins>
116116
</reporting>

spring-data-eclipse-store-benchmark/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<parent>
66
<groupId>software.xdev</groupId>
77
<artifactId>spring-data-eclipse-store-root</artifactId>
8-
<version>2.3.2-SNAPSHOT</version>
8+
<version>2.4.0-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>spring-data-eclipse-store-benchmark</artifactId>
12-
<version>2.3.2-SNAPSHOT</version>
12+
<version>2.4.0-SNAPSHOT</version>
1313
<packaging>jar</packaging>
1414

1515
<inceptionYear>2023</inceptionYear>
@@ -25,7 +25,7 @@
2525
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2626
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2727

28-
<org.springframework.boot.version>3.3.4</org.springframework.boot.version>
28+
<org.springframework.boot.version>3.4.0</org.springframework.boot.version>
2929
<jmh.version>1.37</jmh.version>
3030
</properties>
3131

spring-data-eclipse-store-demo/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>software.xdev</groupId>
99
<artifactId>spring-data-eclipse-store-root</artifactId>
10-
<version>2.3.2-SNAPSHOT</version>
10+
<version>2.4.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>spring-data-eclipse-store-demo</artifactId>
14-
<version>2.3.2-SNAPSHOT</version>
14+
<version>2.4.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>
@@ -28,7 +28,7 @@
2828

2929
<mainClass>software.xdev.spring.data.eclipse.store.demo.complex.ComplexDemoApplication</mainClass>
3030

31-
<org.springframework.boot.version>3.3.4</org.springframework.boot.version>
31+
<org.springframework.boot.version>3.4.0</org.springframework.boot.version>
3232
</properties>
3333

3434
<dependencyManagement>
@@ -113,7 +113,7 @@
113113
<plugin>
114114
<groupId>org.apache.maven.plugins</groupId>
115115
<artifactId>maven-surefire-plugin</artifactId>
116-
<version>3.5.0</version>
116+
<version>3.5.2</version>
117117
<configuration>
118118
<argLine>
119119
--add-opens java.base/java.util=ALL-UNNAMED

0 commit comments

Comments
 (0)