So I have an Apereo CAS project that I am trying to config.
I have found that when running my Apereo CAS WAR overlay with gradle with ./gradlew clean run, CAS does not found the configuration. It says that is null with this INFO message:
2023-10-11 07:53:51,912 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration directory [null] is not a directory or cannot be found at the specific path>
This is because it is trying to load the configuration from /etc/cas/config, which is very impractical since I need to keep copying these files outside of my project to this folder in order to run my program so the files can be found. This is confirmed because if I copy the files the configuration is found:
2023-10-11 08:05:32,929 INFO [org.apereo.cas.configuration.DefaultCasConfigurationPropertiesSourceLocator] - <Configuration files found at [/etc/cas/config] are [[file [/etc/cas/config/application.properties]]] under profile(s) [[standalone]]>
I think that CAS should be trying to load config from '${PROJECT_DIR}/etc/cas/config' and not /etc/cas/config. Is there any property or config that I can use to make this change? I guess that this is because there is the possibility of deploying the project as a Docker, which actually loads config from /etc/cas/config. I also use Docker to deploy the software, so my request is to be able to load from /etc/cas/config when using Docker (prod profile) and load from '${PROJECT_DIR}/etc/cas/config' if I am developing (dev profile).
I am using CAS server with version 6.6.12
This is the default configuration mode which indicates that CAS does NOT require connections to an external configuration server and will run in an embedded standalone mode. When this option is turned on, CAS by default will attempt to locate settings and properties inside a pre-defined directories and files and otherwise falls back to typically using
/etc/cas/configas the configuration directory.Note that by default, all CAS settings and configuration is controlled via the embedded
application.propertiesfile in the CAS server web application. There is also an embeddedapplication.ymlfile that allows you to override all defaults if you wish to ship the configuration inside the main CAS web application and not rely on externalized configuration files. If you prefer properties to yaml, thenapplication-standalone.propertieswill overrideapplication.propertiesas well.