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>

      

+3


source to share


2 answers


It's pretty weird, but:



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.

+3


source


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.

+1


source







All Articles