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:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| package org.apereo.cas.support;
@AutoConfiguration
@EnableConfigurationProperties(CasConfigurationProperties.class)
public class MyConfiguration implements ServiceRegistryExecutionPlanConfigurer {
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public ServiceRegistryDao serviceRegistry() {
...
}
@Override
public void configureServiceRegistry(final ServiceRegistryExecutionPlan plan) {
plan.registerServiceRegistry(serviceRegistry());
}
}
|
At a minimum, your overlay will need to include the following modules:
1
2
3
4
5
| <dependency>
<groupId>org.apereo.cas</groupId>
<artifactId>cas-server-core-services</artifactId>
<version>${cas.version}</version>
</dependency>
|
1
| implementation "org.apereo.cas:cas-server-core-services:${project.'cas.version'}"
|
1
2
3
4
5
6
7
8
9
| dependencyManagement {
imports {
mavenBom "org.apereo.cas:cas-server-support-bom:${project.'cas.version'}"
}
}
dependencies {
implementation "org.apereo.cas:cas-server-core-services"
}
|
1
2
3
4
5
6
7
8
9
10
| dependencies {
/*
The following platform references should be included automatically and are listed here for reference only.
implementation enforcedPlatform("org.apereo.cas:cas-server-support-bom:${project.'cas.version'}")
implementation platform(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES)
*/
implementation "org.apereo.cas:cas-server-core-services"
}
|
See this guide to learn more about how to register configurations into the CAS runtime.