How to write a ConfigMapping that takes values from the root? #33431
-
I wrote a class like this: @ConfigMapping
public interface RabbitMqConfig {
@WithName("rabbitmq-host")
String host();
@WithDefault("5672")
@WithName("rabbitmq-port")
int port();
@WithName("rabbitmq-password")
String password();
@WithName("rabbitmq-username")
String username();
} Now I have the problem that the app will not startup, since I have other variables set, how can I get around that? Stacktrace:
|
Beta Was this translation helpful? Give feedback.
Answered by
luca-bassoricci
May 17, 2023
Replies: 1 comment 4 replies
-
If error is not due to missing mandatory values (eg |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#21088