You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ConfigMapping(prefix = "some.props")
public interface MyConfig {
}
I can not inject it into a custom ConstraintValidator using:
@ApplicationScoped
public class MyValidation implements ConstraintValidator<..., ...> {
@Inject
MyConfig config;
Exception being thrown:
Caused by: java.util.NoSuchElementException: SRCFG00027: Could not find a mapping for ....MyConfig
at io.smallrye.config.ConfigMappings.getConfigMapping(ConfigMappings.java:111)
at io.smallrye.config.SmallRyeConfig.getConfigMapping(SmallRyeConfig.java:411)
at io.quarkus.arc.runtime.ConfigMappingCreator.create(ConfigMappingCreator.java:31)
Expected behavior
Config mappings can be injected, as they can be injected to other ApplicationScope beans.
Actual behavior
No response
How to Reproduce?
See above.
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.4.Final
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
Having a config mapping class:
I can not inject it into a custom
ConstraintValidator
using:Exception being thrown:
Expected behavior
Config mappings can be injected, as they can be injected to other
ApplicationScope
beans.Actual behavior
No response
How to Reproduce?
See above.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.16.4.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /home/ise/.m2/wrapper/dists/apache-maven-3.8.6-bin/67568434/apache-maven-3.8.6 Java version: 17.0.6, vendor: Private Build, runtime: /usr/lib/jvm/java-17-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.15.0-69-generic", arch: "amd64", family: "unix"
Additional information
Workaround is to use the
@ConfigProperty(name = "..")
in the validator, which works atm.The text was updated successfully, but these errors were encountered: