Configuration
EclipseStore Spring-Boot Configuration
The simplest way to configure your storage is by using the key/value pairs in a configuration file as described in the EclipseStore documentation.
Detailed Configuration
If you need more control or want to configure your storage in code, we provide a simple Configuration class which can be used as follows:
Demo configuration
import org.eclipse.store.storage.embedded.types.EmbeddedStorage;
import org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation;
import org.eclipse.store.storage.types.Storage;
...
@Configuration
@EnableEclipseStoreRepositories
public class DemoConfiguration extends EclipseStoreClientConfiguration
{
@Override
public EmbeddedStorageFoundation<?> createEmbeddedStorageFoundation()
{
return EmbeddedStorage.Foundation(Storage.Configuration(Storage.FileProvider(Path.of("demo-storage"))));
}
}
The method createEmbeddedStorageFoundation
could return a much more complicated EmbeddedStorageFoundation
as described here in the EclipseStore documentation about configuration and foundations.
This also enables you to use multiple EclipseStore-Storages in one project. See the Dual storages demo.