diff --git a/service/src/main/java/org/jboss/sbomer/service/feature/sbom/config/SbomConfigBuilderCustomizer.java b/service/src/main/java/org/jboss/sbomer/service/feature/sbom/config/SbomConfigBuilderCustomizer.java new file mode 100644 index 000000000..79a6b933a --- /dev/null +++ b/service/src/main/java/org/jboss/sbomer/service/feature/sbom/config/SbomConfigBuilderCustomizer.java @@ -0,0 +1,28 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2023 Red Hat, Inc., and individual contributors + * as indicated by the @author tags. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.jboss.sbomer.service.feature.sbom.config; + +import io.smallrye.config.SmallRyeConfigBuilder; +import io.smallrye.config.SmallRyeConfigBuilderCustomizer; + +public class SbomConfigBuilderCustomizer implements SmallRyeConfigBuilderCustomizer { + @Override + public void configBuilder(final SmallRyeConfigBuilder builder) { + builder.withMappingIgnore("sbomer.**"); + } +} diff --git a/service/src/main/resources/META-INF/services/io.smallrye.config.SmallRyeConfigBuilderCustomizer b/service/src/main/resources/META-INF/services/io.smallrye.config.SmallRyeConfigBuilderCustomizer new file mode 100644 index 000000000..fbfea7420 --- /dev/null +++ b/service/src/main/resources/META-INF/services/io.smallrye.config.SmallRyeConfigBuilderCustomizer @@ -0,0 +1 @@ +org.jboss.sbomer.service.feature.sbom.config.SbomConfigBuilderCustomizer diff --git a/service/src/main/resources/application.yaml b/service/src/main/resources/application.yaml index 9e14e79b2..443d0a651 100644 --- a/service/src/main/resources/application.yaml +++ b/service/src/main/resources/application.yaml @@ -41,10 +41,6 @@ quarkus: application: version: ${buildNumber} - config: - mapping: - validate-unknown: false - # Make the startup a bit nicer banner: path: banner.txt