All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.icthh.xm.commons.config.client.api.refreshable.SimpleConfigItemClassRefreshableConfiguration Maven / Gradle / Ivy

There is a newer version: 4.0.18
Show newest version
package com.icthh.xm.commons.config.client.api.refreshable;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.type.TypeFactory;
import com.icthh.xm.commons.tenant.TenantContextHolder;
import org.springframework.beans.factory.annotation.Value;

public abstract class SimpleConfigItemClassRefreshableConfiguration extends AbstractRefreshableConfiguration {

    public SimpleConfigItemClassRefreshableConfiguration(@Value("${spring.application.name}") String appName,
                                                         TenantContextHolder tenantContextHolder)  {
        super(appName, tenantContextHolder);
    }

    public JavaType configFileJavaType(TypeFactory factory) {
        return factory.constructType(configFileClass());
    }

    public abstract Class configFileClass();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy