I’ve trouble reading my properties when I create a native image with GraalVM | Problemas leyendo properties cuando creo imagen con GraalVM | Quarkus

  Kiến thức lập trình

I’ve some troubles reading my config properties during the creation of a native image with GraalVM when I get these values through a config server with these configurations:

package org.acme.config;

import lombok.Data;
import jakarta.enterprise.context.ApplicationScoped;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.microprofile.config.inject.ConfigProperty;

@Data
@Slf4j
@ApplicationScoped
public class MyPropertiesConfig {


    @ConfigProperty(name="url")
    private String url;

    @ConfigProperty(name="user.db")
    private String user;

    @ConfigProperty(name="pass.db")
    private String password;

}
quarkus.datasource.db-kind=oracle
quarkus.datasource.jdbc.driver=##########
quarkus.datasource.jdbc.url=##########
quarkus.datasource.username=##########
quarkus.datasource.password=##########

quarkus.application.name=##########
quarkus.spring-cloud-config.enabled=true
quarkus.spring-cloud-config.url=##########
quarkus.spring-cloud-config.username=##########
quarkus.spring-cloud-config.password:##########
quarkus.spring-cloud-config.fail-fast=true
quarkus.spring-cloud-config.profiles=##########
        at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:70)
        at io.quarkus.deployment.steps.ConfigBuildStep$validateRuntimeConfigProperty1282080724.deploy_0(Unknown Source)
        at io.quarkus.deployment.steps.ConfigBuildStep$validateRuntimeConfigProperty1282080724.deploy(Unknown Source)
        ... 8 more
        Suppressed: java.util.NoSuchElementException: SRCFG00014: The config property url is required but it could not be found in any config source
                at io.smallrye.config.SmallRyeConfig.convertValue(SmallRyeConfig.java:435)
                at io.smallrye.config.inject.ConfigProducerUtil.getValue(ConfigProducerUtil.java:100)
                at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:60)
                ... 10 more
        Suppressed: java.util.NoSuchElementException: SRCFG00014: The config property validacion.detalleTecnicoDefault is required but it could not be found in any config source

I try, a lot of things but no one fix that error. :c
I check quarkus logs and it says I’m reaching the configserver so idk what’s going on

New contributor

Alexander Ismael Tejeda Baraho is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT