Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring data aerospike native graalvm #177

Closed
ijusti opened this issue Mar 31, 2023 · 1 comment
Closed

Spring data aerospike native graalvm #177

ijusti opened this issue Mar 31, 2023 · 1 comment

Comments

@ijusti
Copy link

ijusti commented Mar 31, 2023

As aerospike spring data use lazy initialization and native image does not support CGLIB you need to override bean aerospikePersistenceEntityIndexCreator. Using secondary indexes will not work, but actually they work bad.

@Bean
   public BaseAerospikePersistenceEntityIndexCreator aerospikePersistenceEntityIndexCreator(
       AerospikeDataProperties aerospikeDataProperties,
       ObjectProvider<AerospikeMappingContext> aerospikeMappingContext,
       AerospikeIndexResolver aerospikeIndexResolver) {
       return new BaseAerospikePersistenceEntityIndexCreator(aerospikeMappingContext, aerospikeDataProperties.isCreateIndexesOnStartup(), aerospikeIndexResolver){

           @Override
           protected void installIndexes(Set<AerospikeIndexDefinition> indexes) {
               log.warn("Secondary indexes  were not created: {}", indexes);
           }
       };
   }

Also, main properties required to inject aerospike beans to native.

spring.aerospike.hosts: localhost:3000
spring.data.aerospike.namespace: TEST

@wilkinsona
Copy link
Member

wilkinsona commented Apr 11, 2023

This repository is for smoke testing of AOT and native image support that's maintained by the Spring team. Spring Data Aerospike is a third-party project so issues about it do not belong here.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2023
@ijusti ijusti changed the title Spring data aerospike Spring data aerospike native graalvm Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants