Skip to content

Commit 52c3de8

Browse files
Added documentation
1 parent 2a8c20c commit 52c3de8

2 files changed

Lines changed: 27 additions & 15 deletions

File tree

docs/modules/ROOT/pages/configuration.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,24 @@ public class DemoConfiguration extends EclipseStoreClientConfiguration
2828
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].
2929

3030
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].
31+
32+
== Properties
33+
34+
In general properties from EclipseStore can be used.
35+
See https://docs.eclipsestore.io/manual/storage/configuration/properties.html[EclipseStore - Properties].
36+
37+
Here the {product-name}-Properties are displayed (all must be prefixed with ``spring-data-eclipse-store``):
38+
39+
[cols="1,1"]
40+
|===
41+
|https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreClientConfiguration.java[context-close-shutdown-storage.enabled] [[context-close-shutdown-storage]]
42+
| If enabled, the application listens to the ``ContextClosedEvent`` and shuts the storage down if the restart of the spring-dev-tools is enabled (see xref:known-issues.adoc#spring-dev-tools[Known issues] and https://docs.spring.io/spring-boot/api/java/org/springframework/boot/devtools/autoconfigure/DevToolsProperties.Restart.html[DevToolProperties])
43+
44+
Default: ``true``
45+
46+
|https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreClientConfiguration.java[context-close-shutdown-storage.only-when-dev-tools]
47+
|If this and ``context-close-shutdown-storage.enabled`` are true, the application listens to the ``ContextClosedEvent`` and shuts the storage down **only if** the spring-dev-tools are present in the ClassLoader (see xref:known-issues.adoc#spring-dev-tools[Known issues])
48+
49+
Default: ``true``
50+
51+

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

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,14 @@ This helps you keep your data up to date regardless of the current version.
1818

1919
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*.
2020

21-
== Spring Developer Tools
21+
== Spring Developer Tools [[spring-dev-tools]]
2222

2323
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.
24-
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".
24+
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".
2525
It derives from the https://docs.eclipsestore.io/manual/misc/integrations/spring-boot.html#_spring_dev_tools[issue with EclipseStore].
2626

27-
This leads to problems within EclipseStore and can cause issues with discovering beans (https://github.com/spring-projects/spring-boot/issues/41011[Example Issue]).
27+
To mitigate this issue, {product-name} listens to the closing of the Spring-Context and shuts down the storage.
28+
This **should** handle most problems with the ClassLoader.
29+
Restarting the storage leads to a reloading of all entities and may take some time, yet circumvents the Restart ClassLoader Issue.
2830

29-
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].
30-
31-
[source,java,title="Example how to disable restart"]
32-
----
33-
@SpringBootApplication
34-
public class MyApplication {
35-
public static void main(String[] args) {
36-
System.setProperty("spring.devtools.restart.enabled", "false");
37-
SpringApplication.run(MyApplication.class, args);
38-
}
39-
}
40-
----
31+
The behavior can be configured through xref:configuration.adoc#context-close-shutdown-storage[Properties] and is implemented in the https://github.com/xdev-software/spring-data-eclipse-store/tree/develop/spring-data-eclipse-store/src/main/java/software/xdev/spring/data/eclipse/store/repository/config/EclipseStoreClientConfiguration.java[EclipseStoreClientConfiguration.java].

0 commit comments

Comments
 (0)