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 <[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/.
