@Nonnull
    @Override
    protected MessageSource createMessageSource(
        @Nonnull final String basename) {
        return casProperties.getView().getTemplatePrefixes()
            .stream()
            .map(prefix -> StringUtils.appendIfMissing(prefix, "/").concat(basename).concat(".properties"))
            .filter(ResourceUtils::doesResourceExist)
            .findFirst()
            .map(Unchecked.function(this::loadMessageSourceFromPath))
            .map(MessageSource.class::cast)
            .orElseGet(Unchecked.supplier(() -> createExtendedMessageSource(basename)));
    }
This is {@link DefaultCasThemeSource}.

@author Misagh Moayyed
@since 6.6.0
support/cas-server-support-themes-core/src/main/java/org/apereo/cas/services/web/DefaultCasThemeSource.java