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

com.github.yt.mybatis.config.fields.FieldsConfiguration Maven / Gradle / Ivy

There is a newer version: 3.0.1
Show newest version
package com.github.yt.mybatis.config.fields;


import com.github.yt.mybatis.utils.SpringContextUtils;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;

public class FieldsConfiguration {

    private static FieldsDefault fieldsDefault;

    public static FieldsDefault create() {
        if (fieldsDefault != null) {
            return fieldsDefault;
        }
        Object object = null;
        boolean error = false;
        try {
            object = SpringContextUtils.getBean("ytFieldsDefault");
        } catch (NoSuchBeanDefinitionException e) {
            error = true;
        }
        if (error || object == null) {
            fieldsDefault = (FieldsDefault) SpringContextUtils.getBean("defaultFieldsDefault");
        } else {
            fieldsDefault = (FieldsDefault) object;
        }
        return fieldsDefault;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy