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

com.codingapi.springboot.framework.exception.MessageContext Maven / Gradle / Ivy

There is a newer version: 3.2.6
Show newest version
package com.codingapi.springboot.framework.exception;


class MessageContext {

    private static MessageContext context;
    private LocaleMessage localeMessage;

    private MessageContext() {

    }

    public static MessageContext getInstance() {
        if (context == null) {
            synchronized (MessageContext.class) {
                context = new MessageContext();
            }
        }
        return context;
    }

    void setExceptionLocaleMessage(LocaleMessage localeMessage) {
        this.localeMessage = localeMessage;
    }

    public String getErrorMsg(String errCode) {
        return localeMessage.getMessage(errCode);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy