Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

ConditionalyProperties (of Spring Sleuth) resolved during build time #1380

Closed
goafabric opened this issue Dec 16, 2021 · 2 comments
Closed
Assignees
Labels
type: question A question

Comments

@goafabric
Copy link

So this is more of a question ... but the type question is not available here.
From one of the recent blog posts i understand that @ConditionalProperty is now resolved during build time.
Which is not my favorite behaviour, but en par with with Quarkus does.

This of course yields to the situation that i cannot enable things, during runtime, that where disabled during build.

Not a big deal for my own Configuration classes, i just Replaced the ConditionalProperty by an if condition.

But the problem is now with ConditionalProperties managed by spring like:

spring.sleuth.enabled: false
spring.zipkin.enabled: false

During DEV time i don't have Zipkin available, so i reenable this during deploy time in Kubernetes.

I could just always enable the properties, but this yields to a lot of exceptions when Zipkin/Jaeger is not there.

=> The next best option would, to explictly enabled these properties during the native build.

But I could not find in the documentation where to put these.
Neither near the spring boot maven plugin.
Nor <BP_NATIVE_IMAGE_BUILD_ARGUMENTS> ...

A small advice with a code snippet would be appreciated.

thx

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 16, 2021
@sdeleuze sdeleuze added type: question A question and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 16, 2021
@sdeleuze
Copy link
Contributor

Relates to #764, discussing that with the team and will provide a feedback later.

@sdeleuze sdeleuze self-assigned this Dec 16, 2021
@sdeleuze
Copy link
Contributor

Ok let's try to tackle this via #764 in 0.11.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: question A question
Development

No branches or pull requests

3 participants