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

Getting error using value starting with $ in @ClientHeaderParam #34796

Closed
nickhais opened this issue Jul 17, 2023 · 3 comments
Closed

Getting error using value starting with $ in @ClientHeaderParam #34796

nickhais opened this issue Jul 17, 2023 · 3 comments
Labels
kind/question Further information is requested

Comments

@nickhais
Copy link

Describe the bug

Once I run my Quarkus application in Docker and trying to make a call using MyApplicationRestClient I am getting the error failed java.lang.IllegalArgumentException: Failed to convert value for property ${myapp.client-header.auth.client.id} to String.

But if I run the same code directly in my IDE (Intelij IDEA) similar to quarkus dev command the same code works fine and I am able to get response.

I am using

<dependency>
	<groupId>io.quarkus</groupId>
	<artifactId>quarkus-rest-client-reactive-jackson</artifactId>
	<version>3.0.3.Final</version>
</dependency>

And I followed this tutorial implementing my code https://quarkus.io/guides/rest-client-reactive.

Here is a part of my MyApplicationRestClient

@Path("")
@RegisterRestClient(configKey = "myapp-api")
@RegisterClientHeaders(MyApplicationClientHeadersFactory.class)
@ClientHeaderParam(name = "Client-ID", value = "${myapp.client-header.auth.client.id}")
public interface MyApplicationRestClient

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

1.8.0_161

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@nickhais nickhais added the kind/bug Something isn't working label Jul 17, 2023
@geoand
Copy link
Contributor

geoand commented Jul 18, 2023

This means you that the property is not set when at runtime.
You'll need to ensure that the property is properly set for the running container

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2023
@geoand geoand added kind/question Further information is requested and removed kind/bug Something isn't working triage/needs-triage labels Jul 18, 2023
@nickhais
Copy link
Author

This means you that the property is not set when at runtime. You'll need to ensure that the property is properly set for the running container

Thank you very much! That really works.
And sorry for raising this bug

@geoand
Copy link
Contributor

geoand commented Jul 18, 2023

And sorry for raising this bug

No problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants