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

Parameter Store is not found in native version #1293

Closed
mmuniz75 opened this issue Dec 13, 2024 · 3 comments
Closed

Parameter Store is not found in native version #1293

mmuniz75 opened this issue Dec 13, 2024 · 3 comments

Comments

@mmuniz75
Copy link

mmuniz75 commented Dec 13, 2024

I have simple Spring Boot project that works fine in JVM version.
After compile with ./gradlew nativeCompile and try execute I got :

Config data resource '[ParameterStoreConfigDataResource@41369e7b context = '/muniz/lab/', optional = false]' via location 'aws-parameterstore:/muniz/lab/' does not exist

Looks like it is not found the credentials to achieve the resource that contain the parameter store.

JDK : 21
Spring Boot : 3.3.6
Spring Cloud : 2023.0.4
Spring Cloud AWS : 3.2
GrallVM Compiler : Liberica 23.1.5.r21

To test project just need call : http://localhost:8080/param

Spring Boot project attached.
parameter-store.zip

@MatejNedic
Copy link
Member

MatejNedic commented Dec 14, 2024

Hey @mmuniz75 ,
Native hints will be found in 3.3.0-M2 release.

With following hints I have samples that are loading properties normally on the start up with localstack


        hints.reflection().registerType(TypeReference.of(ParameterStorePropertySources.class),
                hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
                        MemberCategory.INTROSPECT_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS));

        hints.resources().registerPattern("io/awspring/cloud/core/SpringCloudClientConfiguration.properties");
 

Could you please provide a Github repo instead of Zip. It is much easier to review

@MatejNedic
Copy link
Member

Hey @mmuniz75 ,

Please check provided github sample here

Please tell me if you example has something different. For me all loading works and I am seeing message printed out. Also, I see fail if parameter is not in localstack.

@mmuniz75
Copy link
Author

Hi MatejNedic,

After I add the : hints.resources().registerPattern("io/awspring/cloud/core/SpringCloudClientConfiguration.properties");

It works !!

Thanks for all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants