代码拉取完成,页面将自动刷新
<?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"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!-- 扫描注入com.fengjing.framework.springmvc包下仅包含@Controller注解的bean -->
<context:component-scan base-package="com.fengjing.framework.springmvc">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
<mvc:annotation-driven />
<!-- 用于将实体转化为xml格式的数据 -->
<bean class="org.springframework.oxm.jaxb.Jaxb2Marshaller" id="jaxbMarshaller">
<property name="classesToBeBound">
<list>
<value>com.fengjing.framework.springmvc.model.Contact</value>
<value>com.fengjing.framework.springmvc.model.Contacts</value>
</list>
</property>
</bean>
<!-- 定义视图资源文件名称 -->
<bean id="resourceBundleViewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="basename" value="views"></property>
<property name="order" value="0" />
</bean>
<!-- 表单校验国际化信息资源文件 -->
<bean class="org.springframework.context.support.ResourceBundleMessageSource" id="messageSource">
<property name="basenames">
<list>
<value>messages</value>
<value>customer</value>
<value>security_messages</value>
</list>
</property>
</bean>
<!-- 处理jsp视图 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- 使用SimpleUrlHandlerMapping来处理SpringMVC -->
<!-- 该配置的信息是当请求地址为/simpleUrl.do时去寻找为simpleUrlController的bean处理 -->
<bean id="simpleUrlHandlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="alwaysUseFullPath" value="true"></property>
<property name="mappings">
<props>
<prop key="/simpleurl.do">simpleUrlController</prop>
</props>
</property>
</bean>
<!-- velocity视图解析 -->
<bean id="velocityConfig" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
<property name="resourceLoaderPath" value="/WEB-INF/velocity/" />
<property name="configLocation" value="/WEB-INF/velocity.properties"></property>
</bean>
<bean id="velocityViewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
<property name="cache" value="true" />
<property name="prefix" value="/" />
<property name="suffix" value=".vm" />
<property name="exposeSpringMacroHelpers" value="true" />
</bean>
<!-- freeMarker视图解析 -->
<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath" value="/WEB-INF/freemarker/" />
</bean>
<bean id="freeMarkerViewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
<property name="cache" value="true" />
<property name="prefix" value="" />
<property name="suffix" value=".ftl" />
<property name="exposeSpringMacroHelpers" value="true" />
</bean>
<!-- SpringMVC错误异常输出 -->
<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
<property name="exceptionMappings">
<props>
<prop key="com.fengjing.framework.springmvc.exception.handling.GenericException">
GenericExceptionPage
</prop>
<prop key="java.lang.Exception">error</prop>
</props>
</property>
</bean>
<!-- 按bean的名字去解析 -->
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
<!--SpringMVCHandlerMapping 取Controller的name部分为请求地址-->
<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping" />
<!--Spring MVC Form Handling-->
<bean class="com.fengjing.framework.springmvc.form.handling.controller.SpringMVCformCustomerController">
<property name="formView" value="CustomerForm" />
<property name="successView" value="CustomerSuccess" />
<property name="validator">
<bean class="com.fengjing.framework.springmvc.form.handling.validator.CustomerValidator" />
</property>
</bean>
<!-- Spring MVC Handling Multipage Forms With AbstractWizardFormController -->
<bean class="com.fengjing.framework.springmvc.handling.multipage.forms.controller.WelcomeController" />
<bean class="com.fengjing.framework.springmvc.handling.multipage.forms.controller.UserController" >
<property name="pages">
<list>
<!-- follow sequence -->
<value>Page1Form</value> <!-- page1 -->
<value>Page2Form</value> <!-- page2 -->
<value>Page3Form</value> <!-- page3 -->
</list>
</property>
<property name="validator">
<bean class="com.fengjing.framework.springmvc.handling.multipage.forms.validator.UserValidator" />
</property>
</bean>
</beans>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。