CAS5.3.0-RC2 - Setting profile specific properties

21 views
Skip to first unread message

Jay

unread,
May 9, 2018, 5:36:13 AM5/9/18
to CAS Community
Hello everyone,


I am trying to place the saml & services directory under the classpath for each environment, like below

[src]
[main]
[resources]
[cas-dev]
[saml]
[services]
[cas-stage]
[saml]
[services]
[cas-prod]
[saml]
[services]

Will it be able to load the specific profile if I make the following changes
  • Add a property to JAVA_OPTS 
-DSpring.profiles.active = <dev/stage/prod>  

  • Make the following changes to application.yml file
info:
description: CAS Configuration

spring:
profiles:
active: dev
cas:
authn:
samlIdp:
metadata:
location: classpath:/cas-dev/saml/
serviceRegistry:
json:
location: classpath:/cas-dev/services/
---
spring:
profiles:
active: stage
cas:
authn:
samlIdp:
metadata:
location: classpath:/cas-stage/saml/
serviceRegistry:
json:
location: classpath:/cas-stage/services/
 
  • Place rest of all the properties in cas.properties file under etc/cas/config 
Could someone please help me here to know if this is the right approach and by doing this the saml and services related files would be loaded without any issues.

P.S. Both application.yml and cas.properties are placed in the same location under etc/cas/config

Thanks in advance.

Regards
Jay 
 
 
 
 
 
 
 
 
Reply all
Reply to author
Forward
0 new messages