สารบัญ
ผังงานเมื่อไม่มีข้อยกเว้นสปริง MVC ทั่วโลก
แผนภูมิการไหลของสปริง MVC Global Exception
จริงๆแล้วมันเป็นวัตถุ ModelandView
ไฟล์กำหนดค่า
ApplicationContext.xml
<? xml version = "1.0" การเข้ารหัส = "utf-8"?> <beans xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://ww.w3.org/2001/xml xmlns: aop = "http://www.springframework.org/schema/aop" xmlns: tx = "http://www.springframework.org/schema/tx" xmlns: jdbc = "http://www.springframework.org/schema/jdbc" xmlns: บริบท = "http://www.springframework.org/schema/context" xmlns: task = "http://www.springframework.org/schema/task" xsi: schemalocation = "http://www.springframework.org/schema/context http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd "> <บริบท: component-scan base-package =" com.mmall " ยกเว้น-> <บริบท: ยกเว้นตัวกรองประเภท = "คำอธิบายประกอบ" นิพจน์ = "org.springframework.steretype.controller"/> </บริบท: คอมโพเนนต์-สแกน> <aop: Aspectj-autoproxy/> <! Resource = "ApplicationContext-spring-session.xml"/> <import Resource = "ApplicationContext-datasource.xml"/> </ebeans>
dispatcher-servlet.xml
<? xml version = "1.0" การเข้ารหัส = "utf-8"?> <beans xmlns = "http://www.springframework.org/schema/beans" xmlns: xsi = "http://ww.w3.org/2001/xml xmlns: p = "http://www.springframework.org/schema/p" xmlns: บริบท = "http://www.springframework.org/schema/context" xmlns: mvc = "http://www.springframework.org/schema/mvc" xmlns: aop = "http://www.springframework.org/schema/aop. http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd "> <! Annotation-config = "true" use-default-filters = "false"> <บริบท: include-filter type = "Annotation" expression = "org.springframework.steretype.controller"/> </บริบท: Component-scan> <mvc: การเพิ่มความคิดเห็น <slist> <value> text/plain; charset = utf-8 </value> <value> text/html; charset = utf-8 </value> </list> </property> </ebean> <bean> <property name = "supportedediatypes"> <ylist> </mvc: ข้อความตัวแปลงข้อความ> </mvc: คำอธิบายประกอบ-ไดรฟ์> <mvc: interceptors> <!-กำหนดไว้ที่นี่พวกเขาทั้งหมดจะถูกสกัดกั้น-> <mvc: interceptor> <!-จัดการ/a.do/จัดการ/*-> <! /จัดการ/**-> <mvc: เส้นทางการแมป = "/จัดการ/**"/> <!-<mvc: exclude-mapping path = "/manage/user/login.do"/>-> <bean/> </mvc: interceptor> </mvc: interceptors> </epeans>
สรุป
ข้างต้นเป็นเนื้อหาทั้งหมดของบทความนี้ ฉันหวังว่าเนื้อหาของบทความนี้จะมีค่าอ้างอิงบางอย่างสำหรับการศึกษาหรือที่ทำงานของทุกคน หากคุณมีคำถามใด ๆ คุณสามารถฝากข้อความไว้เพื่อสื่อสาร ขอบคุณสำหรับการสนับสนุน Wulin.com