目次
SpringMVCグローバル例外がない場合
SpringMVCグローバル例外フローチャート
それは実際にはモデルアンドビューオブジェクトです
構成ファイル
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.springframework.org/schema/jdbc" xmlns:context = "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/comtext http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx 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-package =" com.mmall "> <! exclude-> <context:exclude-filter type = "annotation" expression = "org.springframework.tringframework.stertype.controller"/> </context:component-scan> <aop:aspectj-autoproxy/> <! - springスケジュール - > <> <コンテキスト:プロパティプレイスホルダー場所=クラス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://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd "> <! - springmvc scanパッケージはコントローラーに指定され、繰り返しのササンを防ぐために指定されています。 base-package = "com.mmall.controller" annotation-config = "true" use-default-filters = "false"> <context:inclutation "annotation" expression = "org.springframework.tertype.controller"/> </context:component-scan> <mvc:mvc:mvc:mvc:mvc:mvc:mvc name = "supportedmediatypes"> <list> <value> text/plain; charset = utf-8 </value> <balue> text/html; charset = utf-8 </value> </list> </property> </bean> <bean> <property name = "supportedmedieatypes"> <値> < </bean> </mvc:message-converters> </mvc:annotation-driven> <mvc:interceptors> <! - ここで定義されます。これらすべてがインターセプトされます - > <mvc:> <mvc:> <mvc> <! <! - manage/order/detail.do/manage/** - > <mvc:マッピングpath = "/manage/**"/> <! - <mvc:exclude-mapping path = "/manage/user/login.do"/> - > <
要約します
上記は、この記事のコンテンツ全体です。この記事の内容には、すべての人の研究や仕事に特定の参照値があることを願っています。ご質問がある場合は、メッセージを残してコミュニケーションをとることができます。 wulin.comへのご支援ありがとうございます。