@ConditionalOnMissingBean(name = "jsonAttributeRepositories")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public BeanContainer<PersonAttributeDao> jsonAttributeRepositories(
            final ConfigurableApplicationContext applicationContext,
            final CasConfigurationProperties casProperties) {
            return BeanSupplier.of(BeanContainer.class)
                .when(CONDITION.given(applicationContext.getEnvironment()))
                .supply(() -> {
                    val list = new ArrayList<PersonAttributeDao>();
                    casProperties.getAuthn().getAttributeRepository().getJson()
                        .stream()
                        .filter(json -> ResourceUtils.doesResourceExist(json.getLocation()))
                        .forEach(Unchecked.consumer(json -> {
                            val r = json.getLocation();
                            val dao = new JsonPersonAttributeDao(r);
                            if (ResourceUtils.isFile(r)) {
                                val watcherService = new FileWatcherService(r.getFile(), file -> {
                                    Thread.sleep(100);
                                    dao.init();
                                });
                                watcherService.start(getClass().getSimpleName());
                                dao.setResourceWatcherService(watcherService);
                            }
                            dao.setOrder(json.getOrder());
                            FunctionUtils.doIfNotNull(json.getId(), id -> dao.setId(id));
                            dao.setEnabled(json.getState() != AttributeRepositoryStates.DISABLED);
                            dao.putTag("state", json.getState());
                            dao.init();
                            LOGGER.debug("Configured JSON attribute sources from [{}]", r);
                            list.add(dao);
                        }));
                    return BeanContainer.of(list);
                })
                .otherwise(BeanContainer::empty)
                .get();
        }
This is {@link CasPersonDirectoryJsonConfiguration}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-person-directory/src/main/java/org/apereo/cas/config/CasPersonDirectoryJsonConfiguration.java