@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    @ConditionalOnMissingBean(name = "acceptableUsagePolicyDataSource")
    public DataSource acceptableUsagePolicyDataSource(
        final ConfigurableApplicationContext applicationContext,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(DataSource.class)
            .when(AcceptableUsagePolicyRepository.CONDITION_AUP_ENABLED.given(applicationContext.getEnvironment()))
            .supply(() -> {
                val jdbc = casProperties.getAcceptableUsagePolicy().getJdbc();
                return JpaBeans.newDataSource(jdbc);
            })
            .otherwiseProxy()
            .get();
    }
This is {@link CasAcceptableUsagePolicyJdbcAutoConfiguration} that stores AUP decisions in a mongo database.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-aup-jdbc/src/main/java/org/apereo/cas/config/CasAcceptableUsagePolicyJdbcAutoConfiguration.java