-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 @ConfigProperties bindings are not relaxed #12483
Comments
/cc @geoand |
I don't think relaxed binding is possible, given properties names have to be known at build time... |
Fair enough about relaxed binding but then would be great letting the user decide which kind of binding to use. I don't think |
I agree we should change to kebab case for this extension and document the
limitations.
cc @gytis
…On Sat, Oct 3, 2020, 12:59 Ivan Gregurić Ortolan ***@***.***> wrote:
Fair enough about relaxed binding but then would be great letting the user
decide which kind of binding to use. I don't think
quarkus.arc.config-properties-default-naming-strategy is used in this
case since the default is kebab-case and it is using the exact name of the
property to bind.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12483 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBMDPYLV27D546JAKMC6LLSI3YWVANCNFSM4SB3W4IA>
.
|
Makes sense. I'll fix it. |
…operties Check naming strategy in Spring Boot properties #12483
Exploratory testing for the `quarkus-spring-boot-properties` Quarkus extension. The application consists of a REST endpoint with some different approaches to inject properties. Current limitations: - Relaxing name convention is not supported and it won't be supported: quarkusio/quarkus#12483 - The annotation `@ConstructorBinding` is not supported yet: quarkusio/quarkus#19364
Exploratory testing for the `quarkus-spring-boot-properties` Quarkus extension. The application consists of a REST endpoint with some different approaches to inject properties. Current limitations: - Relaxing name convention is not supported and it won't be supported: quarkusio/quarkus#12483 - The annotation `@ConstructorBinding` is not supported yet: quarkusio/quarkus#19364
Exploratory testing for the `quarkus-spring-boot-properties` Quarkus extension. The application consists of a REST endpoint with some different approaches to inject properties. Current limitations: - Relaxing name convention is not supported and it won't be supported: quarkusio/quarkus#12483 - The annotation `@ConstructorBinding` is not supported yet: quarkusio/quarkus#19364
Describe the bug
When defining properties with kebab case and defining pojos in camel case, the properties are not binded. The preferred behavior would be like described here: Relaxed Binding
Expected behavior
I defined a property named:
prop.name-with-dash
and a class:
The property gets loaded correctly.
Actual behavior
The application fails with:
javax.enterprise.inject.spi.DeploymentException: No config value of type [java.lang.String] exists for: prop.nameWithDash
To Reproduce
The issue is pretty straightforward that's why I am not attaching a project, if really needed let me know and I will add one.
Configuration
Environment (please complete the following information):
uname -a
orver
: Linux host 5.8.10-arch1-1 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP PREEMPT Thu, 17 Sep 2020 18:01:06 +0000 x86_64 GNU/Linuxjava -version
: openjdk version "11.0.8" 2020-07-14mvnw --version
orgradlew --version
): Apache Maven 3.6.3 (NON-CANONICAL_2019-11-27T20:26:29Z_root)The text was updated successfully, but these errors were encountered: