springmvc exception mapping mechanism

Configured in the springmvc configuration file, when an exception occurs, jump to a specific jsp page, so that the user will not report 500

<!--异常映射机制  -->
      <bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
      	<property name="exceptionMappings">
      		<props>
      		<!--当出现此异常时,往设定的jsp页面跳转  -->
      			<prop key="org.springframework.web.multipart.MaxUploadSizeExceededException">/error.jsp</prop>  
      		</props>
      	</property>
      </bean>

Guess you like

Origin blog.csdn.net/WA_MC/article/details/113125518