@Override
    protected String getMessageInternal(final String code, final Object[] args, final Locale locale) {
        val clientInfo = ClientInfoHolder.getClientInfo();
        if (clientInfo != null && StringUtils.isNotBlank(clientInfo.getTenant())) {
            val tenantDefinition = tenantExtractor.getTenantsManager().findTenant(clientInfo.getTenant()).orElseThrow();
            val bindingContext = tenantDefinition.bindProperties();
            if (bindingContext.isBound() && bindingContext.containsBindingFor(MessageBundleProperties.class)) {
                val properties = bindingContext.value();
                properties.getMessageBundle().getBaseNames().addAll(getBasenameSet());
                val bean = configure(new ReloadableResourceBundleMessageSource(), properties);
                return bean.getMessage(code, args, locale);
            }
        }
        return super.getMessageInternal(code, args, locale);
    }
An extension of the {@link ReloadableResourceBundleMessageSource}.

<p>Note: By default, if a key not found in a localized bundle, Spring will auto-fallback
to the default bundle that is {@code messages.properties}. However, if the key is also
not found in the default bundle, and {@link #setUseCodeAsDefaultMessage(boolean)}
is set to true, then only the requested code itself will be used as the message to display.
In this case, the class will issue a WARN message instructing the caller that the bundle
needs further attention. If {@link #setUseCodeAsDefaultMessage(boolean)} is set to false,
only then a {@code null} value will be returned, which subsequently causes an instance
of {@link org.springframework.context.NoSuchMessageException} to be thrown.

@author Misagh Moayyed
@since 4.0.0
core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/view/CasReloadableMessageBundle.java