Оглавление
Блок -схема, когда нет глобального исключения SpringMVC
Global Exception Hyplate Bytry Exception
Это на самом деле объект модели и
Файл конфигурации
ApplicationContext.xml
<? 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: jdbc = "http://www.sprame». xmlns: context = "http://www.springframework.org/schema/context" xmlns: task = "http://www.springframework.org/schema/task" xsi: schemalocation = "http://wwww.springframe.orschema http://www.springframework.org/schema/context http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http:/www.schema/beanshemabemabema. http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd "> <Контекст: Component Scan Base-Cackage =" com.mmall "> <!-Ответственность Scanning the Controller находится за пределами Dispectore-Servle. -> <context: Exclude Filter type = "annotation" Expression = "org.springframework.steretype.controller"/> </context: component-scan> <aop: aspectJa-autoproxy/> <!-Spring Prades-> <sestray: annotholder d-d-d-d-d resource = "ApplicationContext-spring-session.xml"/> <import resource = "ApplicationContext-datasource.xml"/> </beans>
Dispatcher-servlet.xml
<? 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: p = "http://www.springframework.org/schema/p" xmlns: context = "http://www.springframework.org/schema/context" xmlns: mvc = "http://www.springframework.org/schema/mvc" xmlns: aop = "http://www.springframework.org/schema/aop" xsi: schemaLocation = "http://wwww.spramemema 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 "> <!-Springmvc Scan Packan-pack-pack-packge-packge-packge anmaller. annotation-config="true" use-default-filters="false"> <context:include-filter type="annotation" expression="org.springframework.steretype.Controller"/> </context:component-scan> <mvc:annotation-driven> <mvc:message-converters> <bean> <property name="supportedMediaTypes"> <sist> <dathle> text/plain; charset = utf-8 </value> <dall> text/html; charset = utf-8 </value> </list> </property> </bean> <bean> <name = "supportedMediatypes"> <Situe> <datter> application/json; charset = utf-8 </value> </list> </bean> </bean> </bean> </bean> </bean> </bean> </bean> </bean> </bean> </bean> </mvc: Конвертер сообщений> </mvc: annotation-iliven> <mvc: Interceptors> <!-определено здесь, все они будут перехвачены-> <MVC: Interceptor> <!-Manage/A.Do/*-> <!-Manage/B.Do/*-> <! /Manage/**-> <MVC: mapping path = "/Manage/**"/> <!-<mvc: exclide mapping path = "/manage/user/login.do"/>-> <bean/> </mvc: reterceptor> </mvc: receptors> </beans>
Суммировать
Вышеуказанное - все содержание этой статьи. Я надеюсь, что содержание этой статьи имеет определенную справочную ценность для каждого обучения или работы. Если у вас есть какие -либо вопросы, вы можете оставить сообщение для общения. Спасибо за поддержку Wulin.com.