code: public String getMessage(String code,
                               Map<String, String> substitutes,
                               boolean firstFindInMessageBundle,
                               String defaultMessage) {
          Locale locale = authContextHolder.getContext().getDetailsValue(LANGUAGE)
                          .map(Locale::forLanguageTag).orElse(LocaleContextHolder.getLocale());
  
          String localizedMessage = getFromConfig(code, locale).orElseGet(() -> {
              if (firstFindInMessageBundle) {
                  return messageSource.getMessage(code, null, defaultMessage, locale);
              } else {
                  return defaultMessage != null ? defaultMessage : messageSource.getMessage(code, null, locale);
              }
          });
  
          if (MapUtils.isNotEmpty(substitutes)) {
              localizedMessage = new StringSubstitutor(substitutes).replace(localizedMessage);
          }
  
          return localizedMessage;
      }
docs: Finds localized message template by code and current locale from config. If not found it
  takes message from message bundle or from default message first, depends on flag.
  @param code the message code
  @param firstFindInMessageBundle indicates where try to find message first when config has
  returned NULL
  @param defaultMessage the default message
  @return localized message