File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
src/main/java/com/codingapi/springboot/framework Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 2626 <artifactId >spring-tx</artifactId >
2727 </dependency >
2828
29- <dependency >
30- <groupId >org.springframework</groupId >
31- <artifactId >spring-web</artifactId >
32- </dependency >
33-
3429 <dependency >
3530 <groupId >com.alibaba</groupId >
3631 <artifactId >fastjson</artifactId >
5954 <dependency >
6055 <groupId >org.springframework</groupId >
6156 <artifactId >spring-webmvc</artifactId >
57+ <scope >provided</scope >
58+ </dependency >
59+
60+ <dependency >
61+ <groupId >org.springframework</groupId >
62+ <artifactId >spring-web</artifactId >
63+ <scope >provided</scope >
6264 </dependency >
6365
6466 <dependency >
Original file line number Diff line number Diff line change 11package com .codingapi .springboot .framework ;
22
33import com .codingapi .springboot .framework .servlet .ServletExceptionHandler ;
4+ import org .springframework .boot .autoconfigure .condition .ConditionalOnClass ;
45import org .springframework .context .annotation .Bean ;
56import org .springframework .context .annotation .Configuration ;
67import org .springframework .web .servlet .HandlerExceptionResolver ;
8+ import org .springframework .web .servlet .ModelAndView ;
9+ import org .springframework .web .servlet .view .json .MappingJackson2JsonView ;
10+
711
812@ Configuration
913public class AutoConfiguration {
1014
1115 @ Bean
16+ @ ConditionalOnClass (value = {HandlerExceptionResolver .class , ModelAndView .class , MappingJackson2JsonView .class })
1217 public HandlerExceptionResolver servletExceptionHandler () {
1318 return new ServletExceptionHandler ();
1419 }
You can’t perform that action at this time.
0 commit comments