Java Code Examples for org.eclipse.microprofile.config.ConfigProvider#getConfig()

The following examples show how to use org.eclipse.microprofile.config.ConfigProvider#getConfig() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OpenApiDocumentProducer.java    From quarkus with Apache License 2.0 6 votes vote down vote up
/**
 * We load the document from the generated JSON file, which should have all the annotations
 *
 * Most apps will likely just want to serve the OpenAPI doc, rather than inject it, which is why we generated the
 * static file and parse it if required. The more Quarkus-like approach of serializing the doc to bytecode
 * can result in a lot of bytecode, which will likely just be turned straight into a static file anyway.
 */
@PostConstruct
void create() throws IOException {
    try (InputStream is = getClass().getClassLoader()
            .getResourceAsStream(OpenApiHandler.BASE_NAME + Format.JSON)) {
        if (is != null) {
            try (OpenApiStaticFile staticFile = new OpenApiStaticFile(is, Format.JSON)) {
                Config config = ConfigProvider.getConfig();
                OpenApiConfig openApiConfig = new OpenApiConfigImpl(config);

                OpenAPI readerModel = OpenApiProcessor.modelFromReader(openApiConfig,
                        Thread.currentThread().getContextClassLoader());
                document = OpenApiDocument.INSTANCE;
                document.reset();
                document.config(openApiConfig);

                document.modelFromReader(readerModel);
                document.modelFromStaticFile(io.smallrye.openapi.runtime.OpenApiProcessor.modelFromStaticFile(staticFile));
                document.filter(OpenApiProcessor.getFilter(openApiConfig, Thread.currentThread().getContextClassLoader()));
                document.initialize();
            }
        }
    }

}
 
Example 2
Source File: HotDeploymentProcessor.java    From camel-k-runtime with Apache License 2.0 6 votes vote down vote up
@BuildStep
List<HotDeploymentWatchedFileBuildItem> routes() {
    final Config config = ConfigProvider.getConfig();
    final Optional<String> value = config.getOptionalValue(Constants.PROPERTY_CAMEL_K_ROUTES, String.class);

    List<HotDeploymentWatchedFileBuildItem> items = new ArrayList<>();

    if (value.isPresent()) {
        for (String source : value.get().split(",", -1)) {
            String path = StringHelper.after(source, ":");
            if (path == null) {
                path = source;
            }

            Path p = Paths.get(path);
            if (Files.exists(p)) {
                LOGGER.info("Register source for hot deployment: {}", p.toAbsolutePath());
                items.add(new HotDeploymentWatchedFileBuildItem(p.toAbsolutePath().toString()));
            }
        }
    }

    return items;
}
 
Example 3
Source File: TestHTTPResourceManager.java    From quarkus with Apache License 2.0 6 votes vote down vote up
public static String getUri() {
    try {
        Config config = ConfigProvider.getConfig();
        String value = config.getValue("test.url", String.class);
        if (value.equals(TestHTTPConfigSourceProvider.TEST_URL_VALUE)) {
            //massive hack for dev mode tests, dev mode has not started yet
            //so we don't have any way to load this correctly from config
            return "http://" + config.getOptionalValue("quarkus.http.host", String.class).orElse("localhost") + ":"
                    + config.getOptionalValue("quarkus.http.port", String.class).orElse("8080");
        }
        return value;
    } catch (IllegalStateException e) {
        //massive hack for dev mode tests, dev mode has not started yet
        //so we don't have any way to load this correctly from config
        return "http://localhost:8080";
    }
}
 
Example 4
Source File: QuarkusSmallRyeTracingDynamicFeature.java    From quarkus with Apache License 2.0 6 votes vote down vote up
public QuarkusSmallRyeTracingDynamicFeature() {
    Config config = ConfigProvider.getConfig();
    Optional<String> skipPattern = config.getOptionalValue("mp.opentracing.server.skip-pattern", String.class);
    Optional<String> operationNameProvider = config.getOptionalValue("mp.opentracing.server.operation-name-provider",
            String.class);

    ServerTracingDynamicFeature.Builder builder = new ServerTracingDynamicFeature.Builder(
            CDI.current().select(Tracer.class).get())
                    .withOperationNameProvider(OperationNameProvider.ClassNameOperationName.newBuilder())
                    .withTraceSerialization(false);
    if (skipPattern.isPresent()) {
        builder.withSkipPattern(skipPattern.get());
    }
    if (operationNameProvider.isPresent()) {
        if ("http-path".equalsIgnoreCase(operationNameProvider.get())) {
            builder.withOperationNameProvider(OperationNameProvider.WildcardOperationName.newBuilder());
        } else if (!"class-method".equalsIgnoreCase(operationNameProvider.get())) {
            logger.warn("Provided operation name does not match http-path or class-method. Using default class-method.");
        }
    }
    this.delegate = builder.build();
}
 
Example 5
Source File: SmallRyeFaultToleranceProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BuildStep
AnnotationsTransformerBuildItem transformInterceptorPriority(BeanArchiveIndexBuildItem index) {
    return new AnnotationsTransformerBuildItem(new AnnotationsTransformer() {
        @Override
        public boolean appliesTo(Kind kind) {
            return kind == Kind.CLASS;
        }

        @Override
        public void transform(TransformationContext ctx) {
            if (ctx.isClass()) {
                if (!ctx.getTarget().asClass().name().toString()
                        .equals("io.smallrye.faulttolerance.FaultToleranceInterceptor")) {
                    return;
                }
                final Config config = ConfigProvider.getConfig();

                OptionalInt priority = config.getValue("mp.fault.tolerance.interceptor.priority", OptionalInt.class);
                if (priority.isPresent()) {
                    ctx.transform()
                            .remove(ann -> ann.name().toString().equals(Priority.class.getName()))
                            .add(Priority.class, AnnotationValue.createIntegerValue("value", priority.getAsInt()))
                            .done();
                }
            }
        }
    });
}
 
Example 6
Source File: ApplicationYamlTest.java    From quarkus with Apache License 2.0 5 votes vote down vote up
@BeforeAll
public static void doBefore() {
    SmallRyeConfigBuilder builder = new SmallRyeConfigBuilder();
    builder.addDefaultSources().addDiscoveredConverters().addDiscoveredSources();
    QuarkusConfigFactory.setConfig(config = builder.build());
    Config conf = ConfigProvider.getConfig();
    if (conf != config) {
        ConfigProviderResolver cpr = ConfigProviderResolver.instance();
        cpr.releaseConfig(conf);
        ConfigProvider.getConfig();
    }
    System.out.println(System.getProperty("user.dir"));
}
 
Example 7
Source File: SmallRyeJwtProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
/**
 * If the configuration specified a deployment local key resource, register it in native mode
 *
 * @return NativeImageResourceBuildItem
 */
@BuildStep
NativeImageResourceBuildItem registerNativeImageResources() {
    final Config config = ConfigProvider.getConfig();
    Optional<String> publicKeyLocationOpt = config.getOptionalValue("mp.jwt.verify.publickey.location", String.class);
    if (publicKeyLocationOpt.isPresent()) {
        final String publicKeyLocation = publicKeyLocationOpt.get();
        if (publicKeyLocation.indexOf(':') < 0 || publicKeyLocation.startsWith("classpath:")) {
            log.infof("Adding %s to native image", publicKeyLocation);
            return new NativeImageResourceBuildItem(publicKeyLocation);
        }
    }
    return null;
}
 
Example 8
Source File: OpenApiConfigImplTest.java    From smallrye-open-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetStringConfigValuePresent() {
    System.setProperty(TEST_PROPERTY, "  VALUE  \t");

    try {
        Config config = ConfigProvider.getConfig();
        OpenApiConfigImpl oaiConfig = new OpenApiConfigImpl(config);
        // Trim is only used to determine if the value is blank. Full value returned for app use
        assertEquals("  VALUE  \t", oaiConfig.getStringConfigValue(TEST_PROPERTY));
    } finally {
        System.clearProperty(TEST_PROPERTY);
    }
}
 
Example 9
Source File: OpenApiConfigImplTest.java    From smallrye-open-api with Apache License 2.0 5 votes vote down vote up
@Test
public void testGetStringConfigValueBlankIsNull() {
    System.setProperty(TEST_PROPERTY, "\t \n\r");

    try {
        Config config = ConfigProvider.getConfig();
        OpenApiConfigImpl oaiConfig = new OpenApiConfigImpl(config);
        // White-space only value is treated as absent value
        assertNull(oaiConfig.getStringConfigValue(TEST_PROPERTY));
    } finally {
        System.clearProperty(TEST_PROPERTY);
    }
}
 
Example 10
Source File: SmallRyeOpenApiProcessor.java    From quarkus with Apache License 2.0 5 votes vote down vote up
private boolean shouldScanAnnotations(Capabilities capabilities) {
    // Disabled via config
    Config config = ConfigProvider.getConfig();
    boolean scanDisable = config.getOptionalValue(OASConfig.SCAN_DISABLE, Boolean.class).orElse(false);
    if (scanDisable) {
        return false;
    }

    // Only scan if either JaxRS or Spring is used
    boolean isJaxrs = capabilities.isCapabilityPresent(Capabilities.RESTEASY);
    boolean isSpring = capabilities.isCapabilityPresent(Capabilities.SPRING_WEB);
    return isJaxrs || isSpring;
}
 
Example 11
Source File: OpenMetricsExporter.java    From smallrye-metrics with Apache License 2.0 5 votes vote down vote up
public OpenMetricsExporter() {
    try {
        Config config = ConfigProvider.getConfig();
        Optional<Boolean> tmp = config.getOptionalValue(MICROPROFILE_METRICS_OMIT_HELP_LINE, Boolean.class);
        usePrefixForScope = config.getOptionalValue(SMALLRYE_METRICS_USE_PREFIX_FOR_SCOPE, Boolean.class).orElse(true);
        writeHelpLine = !tmp.isPresent() || !tmp.get();
    } catch (IllegalStateException | ExceptionInInitializerError | NoClassDefFoundError t) {
        // MP Config implementation is probably not available. Resort to default configuration.
        usePrefixForScope = true;
        writeHelpLine = true;
    }

}
 
Example 12
Source File: ConfigExtension.java    From smallrye-config with Apache License 2.0 5 votes vote down vote up
protected void validate(@Observes AfterDeploymentValidation adv) {
    Config config = ConfigProvider.getConfig(getContextClassLoader());
    Set<String> configNames = StreamSupport.stream(config.getPropertyNames().spliterator(), false).collect(toSet());
    for (InjectionPoint injectionPoint : injectionPoints) {
        Type type = injectionPoint.getType();

        // We don't validate the Optional / Provider / Supplier / ConfigValue for defaultValue.
        if (type instanceof Class && ConfigValue.class.isAssignableFrom((Class<?>) type)
                || type instanceof Class && OptionalInt.class.isAssignableFrom((Class<?>) type)
                || type instanceof Class && OptionalLong.class.isAssignableFrom((Class<?>) type)
                || type instanceof Class && OptionalDouble.class.isAssignableFrom((Class<?>) type)
                || type instanceof ParameterizedType
                        && (Optional.class.isAssignableFrom((Class<?>) ((ParameterizedType) type).getRawType())
                                || Provider.class.isAssignableFrom((Class<?>) ((ParameterizedType) type).getRawType())
                                || Supplier.class.isAssignableFrom((Class<?>) ((ParameterizedType) type).getRawType()))) {
            return;
        }

        ConfigProperty configProperty = injectionPoint.getAnnotated().getAnnotation(ConfigProperty.class);
        String name = ConfigProducerUtil.getConfigKey(injectionPoint, configProperty);

        // Check if the name is part of the properties first. Since properties can be a subset, then search for the actual property for a value.
        if (!configNames.contains(name) && ConfigProducerUtil.getRawValue(name, (SmallRyeConfig) config) == null) {
            if (configProperty.defaultValue().equals(ConfigProperty.UNCONFIGURED_VALUE)) {
                adv.addDeploymentProblem(InjectionMessages.msg.noConfigValue(name));
            }
        }

        try {
            // Check if there is a Converter registed for the injected type
            Converter<?> resolvedConverter = ConfigProducerUtil.resolveConverter(injectionPoint, (SmallRyeConfig) config);

            // Check if the value can be converted. The TCK checks this, but this requires to get the value eagerly.
            // This should not be required!
            SecretKeys.doUnlocked(() -> ((SmallRyeConfig) config).getOptionalValue(name, resolvedConverter));
        } catch (IllegalArgumentException e) {
            adv.addDeploymentProblem(e);
        }
    }
}
 
Example 13
Source File: ConfigChangeRecorder.java    From quarkus with Apache License 2.0 5 votes vote down vote up
public void handleConfigChange(Map<String, String> buildTimeConfig) {
    Config configProvider = ConfigProvider.getConfig();
    for (Map.Entry<String, String> entry : buildTimeConfig.entrySet()) {
        Optional<String> val = configProvider.getOptionalValue(entry.getKey(), String.class);
        if (val.isPresent()) {
            if (!val.get().equals(entry.getValue())) {
                log.warn("Build time property cannot be changed at runtime. " + entry.getKey() + " was "
                        + entry.getValue() + " at build time and is now " + val.get());
            }
        }
    }
}
 
Example 14
Source File: ZooKeeperConfigSourceTest.java    From smallrye-config with Apache License 2.0 5 votes vote down vote up
@Test
public void testGettingProperty() {
    logger.info("ZooKeeperConfigSourceTest.testGettingProperty");

    Config cfg = ConfigProvider.getConfig();

    //Check that the ZK ConfigSource will work
    assertNotNull(cfg.getValue("io.smallrye.configsource.zookeeper.url", String.class));

    //Check that a property doesn't exist yet
    try {
        cfg.getValue(PROPERTY_NAME, String.class);
        fail("Property " + PROPERTY_NAME + " should not exist");
    } catch (NoSuchElementException ignored) {
    }

    //Check that the optional version of the property is not present
    assertFalse(cfg.getOptionalValue(PROPERTY_NAME, String.class).isPresent());
    //setup the property in ZK
    try {
        curatorClient.createContainers(ZK_KEY);
        curatorClient.setData().forPath(ZK_KEY, PROPERTY_VALUE.getBytes());
    } catch (Exception e) {
        fail("Cannot set property PROPERTY_VALUE directly in Zookeeper");
    }

    //check the property can be optained by a property
    assertEquals(PROPERTY_VALUE, cfg.getValue(PROPERTY_NAME, String.class));

    Set<String> propertyNames = new HashSet<>();
    cfg.getPropertyNames().forEach(propertyNames::add);
    assertTrue(propertyNames.contains(PROPERTY_NAME));
}
 
Example 15
Source File: ConfigMapApp.java    From smallrye-config with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
    Config config = ConfigProvider.getConfig();

    HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0);
    server.createContext("/configMap", exchange -> {
        boolean responseSent = false;

        final Iterable<ConfigSource> configSources = config.getConfigSources();
        for (ConfigSource configSource : configSources) {
            if (configSource.getName().startsWith("FileSystemConfig")) {
                final Map<String, String> properties = configSource.getProperties();
                final byte[] bytes = properties.toString().getBytes();
                exchange.sendResponseHeaders(200, properties.toString().length());
                exchange.getResponseBody().write(bytes);
                exchange.getResponseBody().flush();
                exchange.getResponseBody().close();
                responseSent = true;
                break;
            }
        }

        if (!responseSent) {
            exchange.sendResponseHeaders(404, 0);
            exchange.getResponseBody().write(new byte[0]);
            exchange.getResponseBody().flush();
            exchange.getResponseBody().close();
        }
    });

    server.start();
}
 
Example 16
Source File: ConfigInstantiator.java    From quarkus with Apache License 2.0 5 votes vote down vote up
private static Converter<?> getConverterFor(Type type) {
    // hopefully this is enough
    final SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();
    Class<?> rawType = rawTypeOf(type);
    if (Enum.class.isAssignableFrom(rawType)) {
        return new HyphenateEnumConverter(rawType);
    } else if (rawType == Optional.class) {
        return Converters.newOptionalConverter(getConverterFor(typeOfParameter(type, 0)));
    } else if (rawType == List.class) {
        return Converters.newCollectionConverter(getConverterFor(typeOfParameter(type, 0)), ArrayList::new);
    } else {
        return config.getConverter(rawTypeOf(type));
    }
}
 
Example 17
Source File: SmallRyeReactiveMessagingProcessor.java    From quarkus with Apache License 2.0 4 votes vote down vote up
@BuildStep
@Record(STATIC_INIT)
public void build(SmallRyeReactiveMessagingRecorder recorder, RecorderContext recorderContext,
        BeanContainerBuildItem beanContainer,
        List<MediatorBuildItem> mediatorMethods,
        List<EmitterBuildItem> emitterFields,
        BuildProducer<GeneratedClassBuildItem> generatedClass,
        BuildProducer<ReflectiveClassBuildItem> reflectiveClass,
        ReactiveMessagingConfiguration conf) {

    List<QuarkusMediatorConfiguration> configurations = new ArrayList<>(mediatorMethods.size());

    ClassOutput classOutput = new GeneratedClassGizmoAdaptor(generatedClass, true);

    /*
     * Go through the collected MediatorMethods and build up the corresponding MediaConfiguration
     * This includes generating an invoker for each method
     * The configuration will then be captured and used at static init time to push data into smallrye
     */
    for (MediatorBuildItem mediatorMethod : mediatorMethods) {
        MethodInfo methodInfo = mediatorMethod.getMethod();
        BeanInfo bean = mediatorMethod.getBean();

        String generatedInvokerName = generateInvoker(bean, methodInfo, classOutput);
        /*
         * We need to register the invoker's constructor for reflection since it will be called inside smallrye.
         * We could potentially lift this restriction with some extra CDI bean generation but it's probably not worth it
         */
        reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, generatedInvokerName));

        if (methodInfo.hasAnnotation(ReactiveMessagingDotNames.BLOCKING)) {
            AnnotationInstance blocking = methodInfo.annotation(ReactiveMessagingDotNames.BLOCKING);
            String poolName = blocking.value() == null ? Blocking.DEFAULT_WORKER_POOL : blocking.value().asString();

            recorder.configureWorkerPool(beanContainer.getValue(), methodInfo.declaringClass().toString(),
                    methodInfo.name(), poolName);
        }

        try {
            QuarkusMediatorConfiguration mediatorConfiguration = QuarkusMediatorConfigurationUtil
                    .create(methodInfo, bean,
                            generatedInvokerName, recorderContext,
                            Thread.currentThread().getContextClassLoader());
            configurations.add(mediatorConfiguration);
        } catch (IllegalArgumentException e) {
            throw new DeploymentException(e); // needed to pass the TCK
        }
    }
    recorder.registerMediators(configurations, beanContainer.getValue());

    for (EmitterBuildItem it : emitterFields) {
        Config config = ConfigProvider.getConfig();
        int defaultBufferSize = config.getOptionalValue("mp.messaging.emitter.default-buffer-size", Integer.class)
                .orElseGet(new Supplier<Integer>() {
                    @Override
                    public Integer get() {
                        return config
                                .getOptionalValue("smallrye.messaging.emitter.default-buffer-size", Integer.class)
                                .orElse(127);
                    }
                });
        recorder.configureEmitter(beanContainer.getValue(), it.getEmitterConfig(), defaultBufferSize);
    }
}
 
Example 18
Source File: GenericConfig.java    From smallrye-fault-tolerance with Apache License 2.0 4 votes vote down vote up
protected static Config getConfig() {
    return ConfigProvider.getConfig();
}
 
Example 19
Source File: KubernetesClientUtils.java    From quarkus with Apache License 2.0 4 votes vote down vote up
public static KubernetesClient createClient() {
    org.eclipse.microprofile.config.Config config = ConfigProvider.getConfig();
    Config base = new Config();
    return new DefaultKubernetesClient(new ConfigBuilder()
            .withTrustCerts(config.getOptionalValue(PREFIX + "trust-certs", Boolean.class).orElse(base.isTrustCerts()))
            .withWatchReconnectLimit(config.getOptionalValue(PREFIX + "watch-reconnect-limit", Integer.class)
                    .orElse(base.getWatchReconnectLimit()))
            .withWatchReconnectInterval((int) config.getOptionalValue(PREFIX + "watch-reconnect-interval", Duration.class)
                    .orElse(Duration.ofMillis(base.getWatchReconnectInterval())).toMillis())
            .withConnectionTimeout((int) config.getOptionalValue(PREFIX + "connection-timeout", Duration.class)
                    .orElse(Duration.ofMillis(base.getConnectionTimeout())).toMillis())
            .withRequestTimeout((int) config.getOptionalValue(PREFIX + "request-timeout", Duration.class)
                    .orElse(Duration.ofMillis(base.getRequestTimeout())).toMillis())
            .withRollingTimeout((int) config.getOptionalValue(PREFIX + "rolling-timeout", Duration.class)
                    .orElse(Duration.ofMillis(base.getRollingTimeout())).toMillis())
            .withMasterUrl(config.getOptionalValue(PREFIX + "master-url", String.class).orElse(base.getMasterUrl()))
            .withNamespace(config.getOptionalValue(PREFIX + "namespace", String.class).orElse(base.getNamespace()))
            .withUsername(config.getOptionalValue(PREFIX + "username", String.class).orElse(base.getUsername()))
            .withPassword(config.getOptionalValue(PREFIX + "password", String.class).orElse(base.getPassword()))
            .withCaCertFile(config.getOptionalValue(PREFIX + "ca-cert-file", String.class).orElse(base.getCaCertFile()))
            .withCaCertData(config.getOptionalValue(PREFIX + "ca-cert-data", String.class).orElse(base.getCaCertData()))
            .withClientCertFile(
                    config.getOptionalValue(PREFIX + "client-cert-file", String.class).orElse(base.getClientCertFile()))
            .withClientCertData(
                    config.getOptionalValue(PREFIX + "client-cert-data", String.class).orElse(base.getClientCertData()))
            .withClientKeyFile(
                    config.getOptionalValue(PREFIX + "client-key-file", String.class).orElse(base.getClientKeyFile()))
            .withClientKeyData(
                    config.getOptionalValue(PREFIX + "client-key-data", String.class).orElse(base.getClientKeyData()))
            .withClientKeyPassphrase(config.getOptionalValue(PREFIX + "client-key-passphrase", String.class)
                    .orElse(base.getClientKeyPassphrase()))
            .withClientKeyAlgo(
                    config.getOptionalValue(PREFIX + "client-key-algo", String.class).orElse(base.getClientKeyAlgo()))
            .withHttpProxy(config.getOptionalValue(PREFIX + "http-proxy", String.class).orElse(base.getHttpProxy()))
            .withHttpsProxy(config.getOptionalValue(PREFIX + "https-proxy", String.class).orElse(base.getHttpsProxy()))
            .withProxyUsername(
                    config.getOptionalValue(PREFIX + "proxy-username", String.class).orElse(base.getProxyUsername()))
            .withProxyPassword(
                    config.getOptionalValue(PREFIX + "proxy-password", String.class).orElse(base.getProxyPassword()))
            .withNoProxy(config.getOptionalValue(PREFIX + "no-proxy", String[].class).orElse(base.getNoProxy()))
            .build());
}
 
Example 20
Source File: SpringDataJPAProcessor.java    From quarkus with Apache License 2.0 4 votes vote down vote up
private void detectAndLogSpecificSpringPropertiesIfExist() {
    Config config = ConfigProvider.getConfig();

    Iterable<String> iterablePropertyNames = config.getPropertyNames();
    List<String> propertyNames = new ArrayList<String>();
    iterablePropertyNames.forEach(propertyNames::add);
    List<String> springProperties = propertyNames.stream().filter(s -> pattern.matcher(s).matches()).collect(toList());
    String notSupportedProperties = "";

    if (!springProperties.isEmpty()) {
        for (String sp : springProperties) {
            switch (sp) {
                case SPRING_JPA_SHOW_SQL:
                    notSupportedProperties = notSupportedProperties + "\t- " + SPRING_JPA_SHOW_SQL
                            + " should be replaced by " + QUARKUS_HIBERNATE_ORM_LOG_SQL + "\n";
                    break;
                case SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT:
                    notSupportedProperties = notSupportedProperties + "\t- " + SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT
                            + " should be replaced by " + QUARKUS_HIBERNATE_ORM_DIALECT + "\n";
                    break;
                case SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT_STORAGE_ENGINE:
                    notSupportedProperties = notSupportedProperties + "\t- "
                            + SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT_STORAGE_ENGINE + " should be replaced by "
                            + QUARKUS_HIBERNATE_ORM_DIALECT_STORAGE_ENGINE + "\n";
                    break;
                case SPRING_JPA_GENERATE_DDL:
                    notSupportedProperties = notSupportedProperties + "\t- " + SPRING_JPA_GENERATE_DDL
                            + " should be replaced by " + QUARKUS_HIBERNATE_ORM_DATABASE_GENERATION + "\n";
                    break;
                case SPRING_JPA_HIBERNATE_NAMING_PHYSICAL_STRATEGY:
                    notSupportedProperties = notSupportedProperties + "\t- " + SPRING_JPA_HIBERNATE_NAMING_PHYSICAL_STRATEGY
                            + " should be replaced by " + QUARKUS_HIBERNATE_ORM_PHYSICAL_NAMING_STRATEGY + "\n";
                    break;
                case SPRING_JPA_HIBERNATE_NAMING_IMPLICIT_STRATEGY:
                    notSupportedProperties = notSupportedProperties + "\t- " + SPRING_JPA_HIBERNATE_NAMING_IMPLICIT_STRATEGY
                            + " should be replaced by " + QUARKUS_HIBERNATE_ORM_IMPLICIT_NAMING_STRATEGY + "\n";
                    break;
                case SPRING_DATASOURCE_DATA:
                    notSupportedProperties = notSupportedProperties + "\t- " + QUARKUS_HIBERNATE_ORM_SQL_LOAD_SCRIPT
                            + " could be used to load data instead of " + SPRING_DATASOURCE_DATA
                            + " but it does not support either comma separated list of resources or resources with ant-style patterns as "
                            + SPRING_DATASOURCE_DATA
                            + " does, it accepts the name of the file containing the SQL statements to execute when when Hibernate ORM starts.\n";
                    break;
                default:
                    notSupportedProperties = notSupportedProperties + "\t- " + sp + "\n";
                    break;
            }
        }
        LOGGER.warnf(
                "Quarkus does not support the following Spring Boot configuration properties: %n%s",
                notSupportedProperties);
    }
}