build/classes/spring/springMvc.xml

(完整代码) 2KB

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

	<mvc:annotation-driven conversion-service="conversionService" validator="validator"></mvc:annotation-driven>
	
	<!-- 配置一个校验器 -->
	
	<bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
		<!-- hibernate校验器  指定了提供校验器的提供商  -->
		<property name="providerClass" value="org.hibernate.validator.HibernateValidator"/>
		<!-- 指定校验时资源文件  也就是发生错误显示的信息  -->
		<property name="validationMessageSource" ref="messageSource"/>
	</bean>
	<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
		<property name="basename" value="classpath:UserValidationMessage"/>
		<property name="fileEncodings" value="utf-8"/>
		<property name="cacheSeconds" value="120"/>
	</bean>
	<!-- 自定义参数绑定 -->
	<bean id="conversionService"
		class="org.springframework.format.support.FormattingConversionServiceFactoryBean">
		<!-- 转换器 -->
		<property name="converters">
			<list>
				<bean class="com.shop.controller.converters.DateConverters" />
			</list>
		</property>
	</bean>
	<context:component-scan base-package="com.shop.controller" />
	<bean
		class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="prefix" value="/WEB-INF/jsp/" />
		<property name="suffix" value=".jsp" />
	</bean>
	<!--全局异常  -->
	<!-- <bean class="com.shop.exception.golbalException"/> -->
	<!-- 配置图片上传解析器 -->
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		 <property name="maxUploadSize">
		 	<value>5242880</value>
		 </property>
	</bean>
	<!--拦截器的配置 -->
	<!-- <mvc:interceptors>
		<mvc:interceptor>
			<mvc:mapping path="/admin/*.action"/>
			<bean class="com.shop.interceptor.PrivilageInterceptor" />
		</mvc:interceptor>
	</mvc:interceptors> -->
</beans>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。