Here's our propertyFileConfigurer.xml it uses the environment cariable
CASCONFIGDIR to load 2 different properties files which contain definitions
for various things.

<?xml version="1.0" encoding="UTF-8"?><beans
xmlns="http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:p="http://www.springframework.org/schema/p";
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd";>      
<description>           This
file lets CAS know where you've stored the cas.properties file which
details some of the configuration options               that are specific to 
your
environment.  You can specify the location of the file here.  You may
wish to place the file outside          of the Servlet context if you have
options that are specific to a tier (i.e. test vs. production) so that
the WAR file            can be moved between tiers without modification.        
        WM
NOTE:           Locations are defined at runtime by Tomcat, look for the
setenv.sh file, or,             add this after the JAVA_OPTS= line in
/etc/default/tomcat7, for example:              JAVA_OPTS="${JAVA_OPTS}
-DCASCONFIGDIR=/etc/tomcat7"    </description>          <bean
id="propertyPlaceholderConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
        <property
name="locations">                       <list>                          
<value>${CASCONFIGDIR}/cas.properties</value>                           
<value>${CASCONFIGDIR}/wm.properties</value>                    </list>         
</property>     </bean> </beans>


---
Chris Peck
Manager of *nix Engineering
Information Technology
College of William and Mary
Williamsburg, VA 23187

On Wed, Jul 6, 2016 at 3:32 PM, Ray Bon <[email protected]> wrote:

> If you are trying to externalize your configuration you can add something
> like this to spring-configuration/propertyFileConfigurer.xml
>
>
>     <bean id="propertyPlaceholderConfigurer"
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>         <property name="locations">
>             <list>
>                 <value>/WEB-INF/cas.properties</value>
>                 <value>file:/etc/cas/cas-tier.properties</value>
>             </list>
>         </property>
>     </bean>
>
> Leave cas.properties where it is and create an new properties file with
> items that are more frequently changed or differ by deployment.
>
> Ray
>
> On 2016-07-06 11:35, Chao wrote:
>
> I edited this file in ubuntu: /etc/environment and added
> “cas.properties.config.location=/etc/cas/cas.properties”
> but this doesnt work. I also read that environment variables containing
> dot cannot be defined in linux
> what should I do?
> --
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/
> .
> To view this discussion on the web visit
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/64514702-97e7-40f1-95c4-f030b546420a%40apereo.org?utm_medium=email&utm_source=footer>
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/64514702-97e7-40f1-95c4-f030b546420a%40apereo.org
> .
> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CAS Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/
> .
> To view this discussion on the web visit
> https://groups.google.com/a/apereo.org/d/msgid/cas-user/0af20d69-5175-4dca-25ee-2cb716b1456c%40uvic.ca
> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/0af20d69-5175-4dca-25ee-2cb716b1456c%40uvic.ca?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/a/apereo.org/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAFZ1tga2FbYor934JN7HiORNCWFYPkkHmBVY1d3TD6mwwVsvSA%40mail.gmail.com.
For more options, visit https://groups.google.com/a/apereo.org/d/optout.

Reply via email to