spring-data-tarantool
Spring data repositories support for Tarantool
Usage:
Add following snippet to your project:
repositories {
jcenter()
}
dependencies {
compile 'ru.shadam:spring-data-tarantool:0.3.0'
}
and enable tarantool repositories:
@EnableTarantoolRepositories
public class ApplicationConfiguration {
@Bean
public TarantoolClientOps<Integer, List<?>, Object, List<?>> tarantoolSyncOps(
TarantoolClient tarantoolClient
) {
return tarantoolClient.syncOps();
}
@Bean(destroyMethod = "close")
public TarantoolClient tarantoolClient(
SocketChannelProvider socketChannelProvider,
TarantoolClientConfig config
) {
return new TarantoolClientImpl(socketChannelProvider, config);
}
@Bean
public TarantoolClientConfig tarantoolClientConfig() {
final TarantoolClientConfig config = new TarantoolClientConfig();
config.username = "guest";
return config;
}
@Bean
public SocketChannelProvider socketChannelProvider() {
return new SimpleSocketChannelProvider("localhost", 3301);
}
}
Copyright and License
Copyright 2017 (c) Timur Shakurov.
All versions, present and past, of spring-data-tarantool are licensed under MIT license.