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

io.github.yangyouwang.core.ConfigWrapper Maven / Gradle / Ivy

There is a newer version: 1.8
Show newest version
package io.github.yangyouwang.core;

import io.github.yangyouwang.annotion.Wrapper;
import io.github.yangyouwang.util.PropertiesUtil;

/**
 * config wrapper
 * @author yangyouwang
 */
public class ConfigWrapper extends BaseWorkerWrapper {

    PropertiesUtil propertiesUtil = PropertiesUtil.getInstance();

    @Override
    protected String wrapTheType(Wrapper annotation, String fieldName, String fieldValue) {
        String separator = annotation.separator();
        String def = annotation.def();
        String dictDataValue = propertiesUtil.read(fieldName + separator + fieldValue);
        return null == dictDataValue ? def : dictDataValue;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy