Skip to content

Commit 11d362b

Browse files
Merge branch 'develop' into optimistic-locking
2 parents 5da2dcf + 8085ae4 commit 11d362b

16 files changed

Lines changed: 148 additions & 17 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,4 @@ storage-jpa
8686
.idea/codeStyles/*
8787
!.idea/codeStyles/codeStyleConfig.xml
8888
!.idea/codeStyles/Project.xml
89+
/spring-data-eclipse-store-demo/storage-complex

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 1.0.9
22

33
* Inherited entities with repositories are now realized by reading (finding coherent repositories) and not by writing
4+
* Multiple restarts of the storage at initial startup is now fixed
45

56
# 1.0.8
67

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: '1.0.7'
4+
display_version: '1.0.9'
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: '1.0.7'
12-
maven-version: '1.0.7'
11+
display-version: '1.0.9'
12+
maven-version: '1.0.9'
1313
page-editable: false
1414
page-out-of-support: false

docs/modules/ROOT/pages/known-issues.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,23 @@ There is a library to version your data in the store called https://github.com/x
2929
This helps you keep your data up to date regardless of the current version.
3030

3131
We created https://github.com/xdev-software/spring-data-eclipse-store/issues/33[an issue] for that but right now we *do not support XDEVs MicroMigration*.
32+
33+
== Spring Developer Tools
34+
35+
Using https://docs.spring.io/spring-boot/reference/using/devtools.html[Spring Developer Tools] (`spring-boot-devtools`) can lead to serious issues in your project.
36+
That is manly due to the https://docs.spring.io/spring-boot/reference/using/devtools.html#using.devtools.livereload[LiveReload feature] and the usage of a "Restart Classloader".
37+
38+
This leads to problems within EclipseStore and can cause issues with discovering beans (https://github.com/spring-projects/spring-boot/issues/41011[Example Issue]).
39+
40+
If you must use the Spring Developer Tools, make sure to https://docs.spring.io/spring-boot/reference/using/devtools.html#using.devtools.restart.disable[disable restart].
41+
42+
[source,java,title="Example how to disable restart"]
43+
----
44+
@SpringBootApplication
45+
public class MyApplication {
46+
public static void main(String[] args) {
47+
System.setProperty("spring.devtools.restart.enabled", "false");
48+
SpringApplication.run(MyApplication.class, args);
49+
}
50+
}
51+
----

pom.xml

Lines changed: 1 addition & 1 deletion
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>1.0.9-SNAPSHOT</version>
9+
<version>1.0.10-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>

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

Lines changed: 2 additions & 2 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>1.0.9-SNAPSHOT</version>
8+
<version>1.0.10-SNAPSHOT</version>
99
</parent>
1010

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

1515
<inceptionYear>2023</inceptionYear>

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

Lines changed: 43 additions & 2 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>1.0.9-SNAPSHOT</version>
10+
<version>1.0.10-SNAPSHOT</version>
1111
</parent>
1212

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

1717
<organization>
@@ -62,6 +62,34 @@
6262
<groupId>org.springframework.boot</groupId>
6363
<artifactId>spring-boot-autoconfigure</artifactId>
6464
</dependency>
65+
66+
67+
<dependency>
68+
<groupId>org.junit.jupiter</groupId>
69+
<artifactId>junit-jupiter</artifactId>
70+
<scope>test</scope>
71+
</dependency>
72+
<dependency>
73+
<groupId>org.junit.jupiter</groupId>
74+
<artifactId>junit-jupiter</artifactId>
75+
<scope>test</scope>
76+
</dependency>
77+
<dependency>
78+
<groupId>org.junit.jupiter</groupId>
79+
<artifactId>junit-jupiter</artifactId>
80+
<scope>test</scope>
81+
</dependency>
82+
<dependency>
83+
<groupId>org.springframework.boot</groupId>
84+
<artifactId>spring-boot-starter-test</artifactId>
85+
<exclusions>
86+
<exclusion>
87+
<artifactId>spring-boot-starter-logging</artifactId>
88+
<groupId>org.springframework.boot</groupId>
89+
</exclusion>
90+
</exclusions>
91+
<scope>test</scope>
92+
</dependency>
6593
</dependencies>
6694

6795
<build>
@@ -88,9 +116,22 @@
88116
<jvmArguments>
89117
--add-opens java.base/java.util=ALL-UNNAMED
90118
--add-opens java.base/java.time=ALL-UNNAMED
119+
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
91120
</jvmArguments>
92121
</configuration>
93122
</plugin>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-surefire-plugin</artifactId>
126+
<version>3.3.0</version>
127+
<configuration>
128+
<argLine>
129+
--add-opens java.base/java.util=ALL-UNNAMED
130+
--add-opens java.base/java.time=ALL-UNNAMED
131+
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
132+
</argLine>
133+
</configuration>
134+
</plugin>
94135
</plugins>
95136
</build>
96137
</project>

spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex/ComplexConfiguration.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
package software.xdev.spring.data.eclipse.store.demo.complex;
22

3+
import java.nio.file.Path;
4+
35
import org.eclipse.store.integrations.spring.boot.types.configuration.EclipseStoreProperties;
46
import org.eclipse.store.integrations.spring.boot.types.factories.EmbeddedStorageFoundationFactory;
7+
import org.eclipse.store.storage.embedded.types.EmbeddedStorage;
8+
import org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation;
9+
import org.eclipse.store.storage.types.Storage;
510
import org.springframework.beans.factory.ObjectProvider;
611
import org.springframework.beans.factory.annotation.Autowired;
712
import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
@@ -26,6 +31,20 @@ public ComplexConfiguration(
2631
super(defaultEclipseStoreProperties, defaultEclipseStoreProvider);
2732
}
2833

34+
/**
35+
* This is one option how to configure the {@link EmbeddedStorageFoundation}.
36+
* <p>
37+
* We create a completely new foundation. That means that all configuration (e.g. properties) are not used here.
38+
* With this method you have complete control over the configuration.
39+
* </p>
40+
* Another example: {@link PersistencePersonConfiguration#createEmbeddedStorageFoundation()}
41+
*/
42+
@Override
43+
public EmbeddedStorageFoundation<?> createEmbeddedStorageFoundation()
44+
{
45+
return EmbeddedStorage.Foundation(Storage.Configuration(Storage.FileProvider(Path.of("storage-complex"))));
46+
}
47+
2948
/**
3049
* Overriding {@link #transactionManager(ObjectProvider)} only to add the {@link Bean}-Annotation.
3150
*/

spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/dual/storage/person/PersistencePersonConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ public class PersistencePersonConfiguration extends EclipseStoreClientConfigurat
2929
public PersistencePersonConfiguration(
3030
final EclipseStoreProperties defaultEclipseStoreProperties,
3131
final EmbeddedStorageFoundationFactory defaultEclipseStoreProvider,
32-
final EmbeddedStorageFoundationFactory foundation,
3332
final EclipseStoreProperties properties)
3433
{
3534
super(defaultEclipseStoreProperties, defaultEclipseStoreProvider);
36-
this.foundation = foundation;
35+
this.foundation = defaultEclipseStoreProvider;
3736
this.properties = properties;
3837
}
3938

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package software.xdev.spring.data.eclipse.store.demo.complex;
2+
3+
import static org.junit.jupiter.api.Assertions.assertTrue;
4+
5+
import org.junit.jupiter.api.Test;
6+
import org.springframework.boot.test.context.SpringBootTest;
7+
8+
9+
@SpringBootTest(classes = ComplexDemoApplication.class)
10+
class ComplexDemoApplicationTest
11+
{
12+
@Test
13+
void checkPossibilityToSimplyStartApplication()
14+
{
15+
assertTrue(true);
16+
}
17+
}

0 commit comments

Comments
 (0)