Skip to content

Commit 65ebad7

Browse files
Reproducing the issue
1 parent 991d375 commit 65ebad7

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@
4949
<artifactId>spring-data-eclipse-store</artifactId>
5050
<version>${project.version}</version>
5151
</dependency>
52+
<dependency>
53+
<groupId>org.eclipse.store</groupId>
54+
<artifactId>storage-restservice-springboot</artifactId>
55+
<version>1.4.0</version>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.springframework.boot</groupId>
59+
<artifactId>spring-boot-starter-web</artifactId>
60+
</dependency>
5261

5362
<dependency>
5463
<groupId>org.apache.logging.log4j</groupId>

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

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

33
import java.nio.file.Path;
4+
import java.util.Map;
5+
import java.util.stream.Collectors;
46

57
import org.eclipse.store.integrations.spring.boot.types.configuration.EclipseStoreProperties;
68
import org.eclipse.store.integrations.spring.boot.types.factories.EmbeddedStorageFoundationFactory;
79
import org.eclipse.store.storage.embedded.types.EmbeddedStorage;
810
import org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation;
11+
import org.eclipse.store.storage.embedded.types.EmbeddedStorageManager;
12+
import org.eclipse.store.storage.restadapter.types.StorageRestAdapter;
13+
import org.eclipse.store.storage.restservice.spring.boot.types.configuration.StoreDataRestServiceProperties;
14+
import org.eclipse.store.storage.restservice.spring.boot.types.rest.StoreDataRestController;
915
import org.eclipse.store.storage.types.Storage;
16+
import org.eclipse.store.storage.types.StorageManager;
1017
import org.springframework.beans.factory.ObjectProvider;
1118
import org.springframework.beans.factory.annotation.Autowired;
1219
import org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers;
1320
import org.springframework.context.annotation.Bean;
1421
import org.springframework.context.annotation.Configuration;
22+
import org.springframework.context.annotation.DependsOn;
1523
import org.springframework.transaction.PlatformTransactionManager;
1624

1725
import software.xdev.spring.data.eclipse.store.repository.config.EclipseStoreClientConfiguration;
@@ -48,6 +56,24 @@ public EmbeddedStorageFoundation<?> createEmbeddedStorageFoundation()
4856
return EmbeddedStorage.Foundation(Storage.Configuration(Storage.FileProvider(Path.of(STORAGE_PATH))));
4957
}
5058

59+
@Bean
60+
@DependsOn({"embeddedStorageFoundationFactory"})
61+
public Map<String, StorageRestAdapter> storageRestAdapters(final Map<String, EmbeddedStorageManager> storages)
62+
{
63+
return Map.of(
64+
"default", StorageRestAdapter.New(this.createEmbeddedStorageFoundation())
65+
);
66+
}
67+
68+
@Bean
69+
@DependsOn({"embeddedStorageFoundationFactory"})
70+
public StoreDataRestController storageDataRestController(
71+
final Map<String, StorageRestAdapter> storageRestAdapters,
72+
final StoreDataRestServiceProperties properties)
73+
{
74+
return new StoreDataRestController(storageRestAdapters, properties);
75+
}
76+
5177
/**
5278
* Overriding {@link #transactionManager(ObjectProvider)} only to add the {@link Bean}-Annotation.
5379
*/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.eclipse.store.rest.enabled=false

0 commit comments

Comments
 (0)