Yes, that’s how you currently do it - copy the bean definitions of interest 
from cas-servlet.xml into your cas-servlet-cutom.xml and re-define at will 
(just leave the bean ids alone)

Cheers,
D.

> On Mar 10, 2016, at 3:00 PM, Zhou, Yan <[email protected]> wrote:
> 
> 
> I understood that, but I was trying to redefine existing beans already 
> defined by CAS source code XML.  I do not think I can just put my definition 
> in a different XML. 
> 
> In examples below, I want to redefine the directory pattern that login flow 
> registry uses,  I end up copying the entire XML and change one line. 
> 
> Yan
> 
> On 3/10/2016 1:27 PM, Dmitriy Kopylenko wrote:
>> For dispatcher servlet context beans in CAS 4.1+ there is a better way than 
>> copying the entire cas-servlet.xml. CAS now recognizes the pattern of 
>> additional files for the dispatcher servlet context in the form of 
>> WEB-INF/cas-serlet-*.xml So basically you’d just create an empty file let’s 
>> say WEB-INF/cas-servlet-my-custom-beans.xml and just add your custom beans 
>> that would live in the child (dispatcher servlet) context there.
>> 
>> Cheers,
>> Dmitriy.
>> 
>> 
>>> On Mar 4, 2016, at 10:20 PM, Yan Zhou < 
>>> <mailto:[email protected]>[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> Hi there, 
>>> 
>>> CAS Overlay is supposed to make it easier for upgrade. To the most part it 
>>> is, however, if I have to redefine a bean or an existing configuration, I 
>>> find I have to copy the file from CAS source, and change it in my overlay 
>>> setup.
>>> 
>>> Here is an example, I copied over cas-servlet.xml, only because these two 
>>> changes. Now I have a 4.1.5 cas-servlet.xml,  when I upgrade to 4.2, I have 
>>> to incorporate 4.2 cas-servlet.xml, because it may have new changes, not as 
>>> simple as change the CAS version in POM.xml
>>> 
>>> How do you deal with that in a better way?
>>> Yan
>>> 
>>> <!--  to declare our own handler so that we can add additional exceptions 
>>> -->
>>> <bean id="authenticationExceptionHandler" 
>>> class="org.jasig.cas.web.flow.MyAuthenticationExceptionHandler" />
>>> 
>>>   <webflow:flow-registry id="loginFlowRegistry" 
>>> flow-builder-services="builder" base-path="/WEB-INF/webflow">
>>>     <!-- changed to allow subflow,   -->
>>>     <webflow:flow-location-pattern value="/login/**/*-webflow.xml"/>
>>>   </webflow:flow-registry>
>>> 
>>> 
>>> 
>>> -- 
>>> 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] 
>>> <mailto:[email protected]>.
>>> Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/ 
>>> <https://groups.google.com/a/apereo.org/group/cas-user/>.
>> 
> 

-- 
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].
Visit this group at https://groups.google.com/a/apereo.org/group/cas-user/.

Reply via email to