@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        @Bean
        @ConditionalOnMissingBean(name = "dataSourceSamlMetadataIdP")
        public DataSource dataSourceSamlMetadataIdP(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(DataSource.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val idp = casProperties.getAuthn().getSamlIdp().getMetadata();
                    return JpaBeans.newDataSource(idp.getJpa());
                })
                .otherwiseProxy()
                .get();
        }
This is {@link SamlIdPJpaIdPMetadataConfiguration}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-saml-idp-metadata-jpa/src/main/java/org/apereo/cas/config/SamlIdPJpaIdPMetadataConfiguration.java