<commit_before><?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:context="http://www.springframework.org/schema/context"
	   xmlns:mvc="http://www.springframework.org/schema/mvc"
	   xmlns:util="http://www.springframework.org/schema/util"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc.xsd
       http://www.springframework.org/schema/util
       http://www.springframework.org/schema/util/spring-util.xsd">

	<!-- DispatchServlet Context : defines this Servlet's request-processing infrastructure -->

	<!-- Scans the classpath of this application for @Components to deploy as beans -->
	<context:component-scan base-package="com.kancolle.server.controller" use-default-filters="false">
		<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
		<context:include-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
	</context:component-scan>

	<!-- Configures the @Controller programming model -->
	<mvc:annotation-driven ignore-default-model-on-redirect="true" enable-matrix-variables="false">
		<mvc:message-converters>
			<!-- <ref bean="stringHttpMessageConverter" /> -->
			<ref bean="fastJsonHttpMessageConverter" />
			<!-- <ref bean="marshallingHttpMessageConverter" /> -->
			<ref bean="jacksonHttpMessageConverter" />
		</mvc:message-converters>
	</mvc:annotation-driven>

	<bean id="fastJsonHttpMessageConverter" class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>text/plain;charset=UTF-8</value>
			</list>
		</property>
		<property name="features">
			<list>
				<!-- <value>WriteDateUseDateFormat</value> -->
				<value>BrowserCompatible</value>
				<!-- <value>WriteMapNullValue</value> -->
				<value>DisableCircularReferenceDetect</value>
			</list>
		</property>
	</bean>

	<bean id="jackson2ObjectMapper" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
		<property name="featuresToEnable">
			<array>
				<util:constant static-field="com.fasterxml.jackson.core.JsonGenerator.Feature.ESCAPE_NON_ASCII" />
				<util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION" />
			</array>
		</property>
	</bean>

	<bean id="jacksonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>text/plain;charset=UTF-8</value>
			</list>
		</property>
		<property name="jsonPrefix" value="svdata=" />
		<property name="objectMapper" ref="jackson2ObjectMapper"/>
	</bean>

	<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources/ directory -->
	<!-- <import resource="resource-dev.xml" /> -->

	<!-- Allows for mapping the DispatcherServlet to "/" by forwarding static resource requests to the container's default Servlet -->
	<!--<mvc:default-servlet-handler />-->
	<mvc:resources mapping="/kcs/**" location="/static/kcs/" cache-period="31556926" />


	<!-- 	<mvc:interceptors>
            使用bean定义一个Interceptor，直接定义在mvc:interceptors根下面的Interceptor将拦截所有的请求
            <mvc:interceptor>
                <mvc:mapping path="/kcsapi/**" />
                &lt;!&ndash; 定义在mvc:interceptor下面的表示是对特定的请求才进行拦截的 &ndash;&gt;
                <bean class="com.kancolle.server.web.interceptor.APITokenHandlerInterceptor" />
            </mvc:interceptor>
        </mvc:interceptors> -->

	<!-- <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> 定义默认的异常处理页面，当该异常类型的注册时使用 <property name="defaultErrorView" value="/commom/error"/> 定义异常处理页面用来获取异常信息的变量名，默认名为exception 
		<property name="exceptionAttribute" value="ex"/> 定义需要特殊处理的异常，用类名或完全路径名作为key，异常也页名作为值 <property name="exceptionMappings"> <props> <prop key="java.lang.IllegalArgumentException"/> <prop key="cn.basttg.core.exception.ParameterException">error-parameter</prop> 
		这里还可以继续扩展对不同异常类型的处理 </props> </property> </bean> -->
</beans><commit_msg>format spring-mvc<commit_after><?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:context="http://www.springframework.org/schema/context"
	   xmlns:mvc="http://www.springframework.org/schema/mvc"
	   xmlns:util="http://www.springframework.org/schema/util"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc.xsd
       http://www.springframework.org/schema/util
       http://www.springframework.org/schema/util/spring-util.xsd">

	<!-- DispatchServlet Context : defines this Servlet's request-processing infrastructure -->

	<!-- Scans the classpath of this application for @Components to deploy as beans -->
	<context:component-scan base-package="com.kancolle.server.controller" use-default-filters="false">
		<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
		<context:include-filter type="annotation" expression="org.springframework.web.bind.annotation.ControllerAdvice" />
	</context:component-scan>

	<!-- Configures the @Controller programming model -->
	<mvc:annotation-driven ignore-default-model-on-redirect="true" enable-matrix-variables="false">
		<mvc:message-converters>
			<!-- <ref bean="stringHttpMessageConverter" /> -->
			<ref bean="fastJsonHttpMessageConverter" />
			<!-- <ref bean="marshallingHttpMessageConverter" /> -->
			<ref bean="jacksonHttpMessageConverter" />
		</mvc:message-converters>
	</mvc:annotation-driven>

	<bean id="fastJsonHttpMessageConverter" class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>text/plain;charset=UTF-8</value>
			</list>
		</property>
		<property name="features">
			<list>
				<!-- <value>WriteDateUseDateFormat</value> -->
				<value>BrowserCompatible</value>
				<!-- <value>WriteMapNullValue</value> -->
				<value>DisableCircularReferenceDetect</value>
			</list>
		</property>
	</bean>

	<bean id="jackson2ObjectMapper" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean">
		<property name="featuresToEnable">
			<array>
				<util:constant static-field="com.fasterxml.jackson.core.JsonGenerator.Feature.ESCAPE_NON_ASCII" />
				<util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION" />
			</array>
		</property>
	</bean>

	<bean id="jacksonHttpMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>text/plain;charset=UTF-8</value>
			</list>
		</property>
		<property name="jsonPrefix" value="svdata=" />
		<property name="objectMapper" ref="jackson2ObjectMapper"/>
	</bean>

	<!-- Allows for mapping the DispatcherServlet to "/" by forwarding static resource requests to the container's default Servlet -->
	<!--<mvc:default-servlet-handler />-->
	<mvc:resources mapping="/kcs/**" location="/static/kcs/" cache-period="31556926" />


	<!-- 	<mvc:interceptors>
            使用bean定义一个Interceptor，直接定义在mvc:interceptors根下面的Interceptor将拦截所有的请求
            <mvc:interceptor>
                <mvc:mapping path="/kcsapi/**" />
                &lt;!&ndash; 定义在mvc:interceptor下面的表示是对特定的请求才进行拦截的 &ndash;&gt;
                <bean class="com.kancolle.server.web.interceptor.APITokenHandlerInterceptor" />
            </mvc:interceptor>
        </mvc:interceptors> -->

	<!--<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">-->
		<!--&lt;!&ndash; 定义默认的异常处理页面，当该异常类型的注册时使用 &ndash;&gt;-->
		<!--<property name="defaultErrorView" value="/commom/error"/>-->
		<!--&lt;!&ndash; 定义异常处理页面用来获取异常信息的变量名，默认名为exception &ndash;&gt;-->
		<!--<property name="exceptionAttribute" value="ex"/>-->
		<!--<property name="exceptionMappings">-->
			<!--<props>-->
				<!--<prop key="java.lang.IllegalArgumentException"/>-->
				<!--<prop key="cn.basttg.core.exception.ParameterException">error-parameter</prop>-->
				<!--&lt;!&ndash; 定义需要特殊处理的异常，用类名或完全路径名作为key，异常也页名作为值 &ndash;&gt;-->
			<!--</props>-->
		<!--</property>-->
	<!--</bean>-->
</beans>
{'fraction_non_alphanumeric': 0.16501171482762467, 'fraction_numerical': 0.004909070623675109, 'mean_word_length': 4.419588875453446, 'pattern_counts': {'":': 0, '<': 184, '<?xml version=': 2, '>': 184, 'https://': 0, 'lorem ipsum': 0, 'www.': 26, 'xml': 17}, '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': '4926242', 'n_tokens_mistral': 3087, 'n_tokens_neox': 2890, 'n_words': 361}