Spring data aerospike
I would like to work with Aerospike
and use Spring Data
. I found a useful library for my purposes here .
However, but adding it in dependencies, this code from sample still couldn't find dependencies.
@Configuration
@EnableAerospikeRepositories(basePackageClasses =
ContactRepository.class)
class ApplicationConfig extends AbstractAerospikeConfiguration {
public @Bean(destroyMethod = "close") AerospikeClient aerospikeClient() {
ClientPolicy policy = new ClientPolicy();
policy.failIfNotConnected = true;
return new AerospikeClient(policy, "localhost", 3000);
}
public @Bean AerospikeTemplate aerospikeTemplate() {
return new AerospikeTemplate(aerospikeClient(), "bar");
}
}
Even less information can be found on Google. I already tried to add another repository, for example:
<repositories>
<repository>
<id>spring-milestone</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
Also, a sample project can be found here . And guess what? It also won't be built.
I installed the latest Maven
, updated repositories, still no result. Maybe I am missing some basic dependencies?
EDIT:
I added just like any other dependency. First, it was not found at all, but after an update Maven
that looked OK. However, I still couldn't import the required sources.
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-aerospike</artifactId>
<version>1.5.0.RELEASE</version>
</dependency>
source to share
It's pretty weird, but:
- It's off-center: http://search.maven.org/#search%7Cga%7C1%7Cspring-data-aerospike
- It's not in spring libs-release: https://repo.spring.io/libs-release/org/springframework/data/
- There is a snapshot in libs-snapshot: https://repo.spring.io/libs-snapshot/org/springframework/data/spring-data-aerospike/
- Here's http://www.aerospike.jp/docs/connectors/spring/tutorial_1.html the tutorial depends on
spring-boot-starter-data-aerospike
which has version 0.0.1-SNAPSHOT and isspring-boot-starter-data-aerospike
not included in the release plugin repository: https: //repo.spring. io / plugins-release / org / springframework / boot / - In its main
pom.xml
https://github.com/spring-projects/spring-data-aerospike/blob/master/pom.xml the version1.0.1.BUILD-SNAPSHOT
which is not1.5.0.RELEASE
and which precedes it - The github repository has no tags and no releases.
So it looks like no public release has been made and their recommendation to "Add Maven Dependency" (the one you added with version 1.5.0.RELEASE
) just won't work.
To use this library in your project, you can checkout via git, build the project ( mvn install
) and then use it from your local repository. Sources can be manually attached to your IDE. To use other machines later, you can redistribute the created jar and use mvn deploy:deploy-file
it to install it into your local repositories.
source to share
The Spring Data for Aerospike connector was released using the com.aerospike group id and you can now download it from maven hub.
A new sample project has been created that uses Spring Data for Aerospike.
The tutorial has also been updated to match the sample project.
source to share