@ConditionalOnMissingBean(name = "inspektrAuditTrailDataSource")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public DataSource inspektrAuditTrailDataSource(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(DataSource.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> JpaBeans.newDataSource(casProperties.getAudit().getJdbc()))
                .otherwiseProxy()
                .get();
        }
This is {@link CasJdbcAuditAutoConfiguration}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-audit-jdbc/src/main/java/org/apereo/cas/config/CasJdbcAuditAutoConfiguration.java