<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to Jasig under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Jasig licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License.  You may obtain a
    copy of the License at the following location:

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<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" xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">
    <description>
        This is the main Spring configuration file with some of the main "core" classes defined. You shouldn't really
        modify this unless you know what you're doing!
    </description>

    <!-- Message source for this context, loaded from localized "messages_xx" files.
    	Disable the fallback mechanism to the system/JVM locale. By turning off this behavior, CAS
    	will be able to revert back to the default language bundle that is "messages.properties"
    	and will not rely on the JVM default locale which introduces the side effect of rendering
    	the UI in the JVM locale by default.
    -->
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
          p:basename="messages" p:fallbackToSystemLocale="false" />

    <bean id="servicesManager" class="org.jasig.cas.services.DefaultServicesManagerImpl">
        <constructor-arg index="0" ref="serviceRegistryDao"/>
    </bean>
    
    <!-- Spring-Json View provides a JsonExceptionResolver exceptions thrown during a controller action -->
    <bean id="ajaxExceptionResolver" class="org.jasig.cas.web.view.AjaxAwareJsonExceptionResolver">
        <property name="exceptionView" value="jsonView" />
        <property name="errorHandler">
            <list>
                <bean class="org.springframework.web.servlet.view.json.error.HttpStatusError" p:errorCode="412"/>
                <bean class="org.springframework.web.servlet.view.json.error.ModelFlagError"/>
            </list>
        </property>
        <property name="exceptionHandler">
            <list>
                <bean class="org.springframework.web.servlet.view.json.exception.StackTraceExceptionHandler" />
            </list>
        </property>
    </bean>
</beans><commit_msg>CAS-1302: Applied the same fix over to the mgmt webapp.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--

    Licensed to Jasig under one or more contributor license
    agreements. See the NOTICE file distributed with this work
    for additional information regarding copyright ownership.
    Jasig licenses this file to you under the Apache License,
    Version 2.0 (the "License"); you may not use this file
    except in compliance with the License.  You may obtain a
    copy of the License at the following location:

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<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" xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
        http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">
    <description>
        This is the main Spring configuration file with some of the main "core" classes defined. You shouldn't really
        modify this unless you know what you're doing!
    </description>

    <!-- 
        Message source for this context, loaded from localized "messages_xx" files.
        
    	Disable the fallback mechanism to the system/JVM locale. By turning off this behavior, CAS
    	will be able to revert back to the default language bundle that is "messages.properties"
    	and will not rely on the JVM default locale which introduces the side effect of rendering
    	the UI in the JVM locale by default.
      
        Also, explicitly set the default encoding to be UTF-8 when parsing message bundles.
        The default, if not set, is none which forces ISO-8859-1 of java.util.ResourceBundle.
    -->
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"
          p:basename="messages" p:fallbackToSystemLocale="false" p:defaultEncoding="UTF-8" />

    <bean id="servicesManager" class="org.jasig.cas.services.DefaultServicesManagerImpl">
        <constructor-arg index="0" ref="serviceRegistryDao"/>
    </bean>
    
    <!-- Spring-Json View provides a JsonExceptionResolver exceptions thrown during a controller action -->
    <bean id="ajaxExceptionResolver" class="org.jasig.cas.web.view.AjaxAwareJsonExceptionResolver">
        <property name="exceptionView" value="jsonView" />
        <property name="errorHandler">
            <list>
                <bean class="org.springframework.web.servlet.view.json.error.HttpStatusError" p:errorCode="412"/>
                <bean class="org.springframework.web.servlet.view.json.error.ModelFlagError"/>
            </list>
        </property>
        <property name="exceptionHandler">
            <list>
                <bean class="org.springframework.web.servlet.view.json.exception.StackTraceExceptionHandler" />
            </list>
        </property>
    </bean>
</beans>
{'fraction_non_alphanumeric': 0.09955718430294702, 'fraction_numerical': 0.007787448465414567, 'mean_word_length': 3.174633524537922, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 2, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 18, 'xml': 10}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3145376', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1678, 'n_words': 554}