Configuration properties can be included and activated using the following strategies.
Note
When possible, properties should be stored in lower-case kebab format, such as cas.property-name=value
.
The only possible exception to this rule is when naming actuator endpoints; The name of the
actuator endpoints (i.e. ssoSessions
) MUST remain in camelCase mode.
CAS properties can be specified using the Java configuration property syntax in any and all
.properties
files:
1
|
spring.mail.default-encoding=UTF-8
|
This is the most common form of property configuration that is recognized by CAS, regardless
of the actual property source, which might in fact be managed separately outside the CAS environment, by another system
or cloud framework.
CAS properties can be specified using the YAML syntax:
1
|
spring: mail: default-encoding: "UTF-8"
|
Note that YAML is very specific about structure and indentation. Be sure to verify the correctness of the final result
with your YAML validator of choice.
CAS properties can be passed to the CAS web application as system properties, when the application is launched:
1
|
java -Dspring.mail.default-encoding="UTF-8" -jar build/libs/cas.war
|
The above example assumes that the CAS web application is packaged as
cas.war
with an embedded server container and can be found in the
build/libs
directory. Note the placement of the system property which must be
specified before the CAS web application is launched.
CAS properties can specified as system environment variables before the CAS web application is launched:
1
2
3
|
export SPRING_MAIL_DEFAULT_ENCODING="UTF-8"
java -jar build/libs/cas.war
|
The above example assumes that the CAS web application is packaged as
cas.war
with an embedded server container and can be found in the
build/libs
directory.
CAS properties can be passed to the CAS web application as command-line arguments, when the application is launched:
1
|
java -jar build/libs/cas.war --spring.mail.default-encoding="UTF-8"
|
The above example assumes that the CAS web application is packaged as
cas.war
with an embedded server container and can be found in the
build/libs
directory.