<commit_before>---
layout: default
title: CAS - Custom Service Registry
---

# Custom Service Registry

If you wish to design your own implementation of a service registry, you will need to inject your implementation into CAS as such:

```java
package org.apereo.cas.support;

@Configuration("myConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration {

  @Bean
  @RefreshScope
  public ServiceRegistryDao serviceRegistry() {
      ...
  }<commit_msg>Update Custom-Service-Management.md<commit_after>---
layout: default
title: CAS - Custom Service Registry
---

# Custom Service Registry

If you wish to design your own implementation of a service registry, you will need to inject your implementation into CAS as such:

```java
package org.apereo.cas.support;

@Configuration("myConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration implements ServiceRegistryExecutionPlanConfigurer {

  @Bean
  @RefreshScope
  public ServiceRegistryDao serviceRegistry() {
      ...
  }
  
  @Override
  public void configureServiceRegistry(final ServiceRegistryExecutionPlan plan) {
    plan.registerServiceRegistry(serviceRegistry());
  }
{'fraction_non_alphanumeric': 0.07766990291262135, 'fraction_numerical': 0.0, 'mean_word_length': 5.123762376237623, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5713069', 'n_tokens_mistral': 311, 'n_tokens_neox': 295, 'n_words': 104}