|
20 | 20 |
|
21 | 21 | package org.springdoc.webmvc.ui;
|
22 | 22 |
|
| 23 | +import java.util.List; |
23 | 24 | import java.util.Optional;
|
24 | 25 |
|
25 | 26 | import org.springdoc.core.SwaggerUiConfigParameters;
|
26 | 27 | import org.springdoc.core.providers.ActuatorProvider;
|
27 | 28 |
|
| 29 | +import org.springframework.format.FormatterRegistry; |
| 30 | +import org.springframework.http.converter.HttpMessageConverter; |
| 31 | +import org.springframework.lang.Nullable; |
| 32 | +import org.springframework.validation.MessageCodesResolver; |
| 33 | +import org.springframework.validation.Validator; |
| 34 | +import org.springframework.web.method.support.HandlerMethodArgumentResolver; |
| 35 | +import org.springframework.web.method.support.HandlerMethodReturnValueHandler; |
| 36 | +import org.springframework.web.servlet.HandlerExceptionResolver; |
| 37 | +import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer; |
| 38 | +import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer; |
| 39 | +import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| 40 | +import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; |
| 41 | +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| 42 | +import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; |
28 | 43 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
| 44 | +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; |
| 45 | +import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; |
29 | 46 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
30 | 47 |
|
31 | 48 | import static org.springdoc.core.Constants.CLASSPATH_RESOURCE_LOCATION;
|
|
37 | 54 | * The type Swagger web mvc configurer.
|
38 | 55 | * @author bnasslahsen
|
39 | 56 | */
|
40 |
| -@SuppressWarnings("deprecation") |
41 |
| -public class SwaggerWebMvcConfigurer implements WebMvcConfigurer { // NOSONAR |
| 57 | +public class SwaggerWebMvcConfigurer implements WebMvcConfigurer { |
42 | 58 |
|
43 | 59 | /**
|
44 | 60 | * The Swagger path.
|
@@ -84,4 +100,93 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
84 | 100 | .addTransformer(swaggerIndexTransformer);
|
85 | 101 | }
|
86 | 102 |
|
| 103 | + @Override |
| 104 | + public void configurePathMatch(PathMatchConfigurer configurer) { |
| 105 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 106 | + } |
| 107 | + |
| 108 | + |
| 109 | + @Override |
| 110 | + public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { |
| 111 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 112 | + } |
| 113 | + |
| 114 | + @Override |
| 115 | + public void configureAsyncSupport(AsyncSupportConfigurer configurer) { |
| 116 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 117 | + } |
| 118 | + |
| 119 | + @Override |
| 120 | + public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) { |
| 121 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 122 | + } |
| 123 | + |
| 124 | + @Override |
| 125 | + public void addFormatters(FormatterRegistry registry) { |
| 126 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 127 | + } |
| 128 | + |
| 129 | + @Override |
| 130 | + public void addInterceptors(InterceptorRegistry registry) { |
| 131 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 132 | + } |
| 133 | + |
| 134 | + @Override |
| 135 | + public void addCorsMappings(CorsRegistry registry) { |
| 136 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 137 | + } |
| 138 | + |
| 139 | + @Override |
| 140 | + public void addViewControllers(ViewControllerRegistry registry) { |
| 141 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 142 | + } |
| 143 | + |
| 144 | + @Override |
| 145 | + public void configureViewResolvers(ViewResolverRegistry registry) { |
| 146 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 147 | + } |
| 148 | + |
| 149 | + @Override |
| 150 | + public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) { |
| 151 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 152 | + } |
| 153 | + |
| 154 | + @Override |
| 155 | + public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) { |
| 156 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 157 | + } |
| 158 | + |
| 159 | + @Override |
| 160 | + public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
| 161 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 162 | + } |
| 163 | + |
| 164 | + @Override |
| 165 | + public void extendMessageConverters(List<HttpMessageConverter<?>> converters) { |
| 166 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 167 | + } |
| 168 | + |
| 169 | + @Override |
| 170 | + public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) { |
| 171 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 172 | + } |
| 173 | + |
| 174 | + @Override |
| 175 | + public void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) { |
| 176 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 177 | + } |
| 178 | + |
| 179 | + @Override |
| 180 | + @Nullable |
| 181 | + public Validator getValidator() { |
| 182 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 183 | + return null; |
| 184 | + } |
| 185 | + |
| 186 | + @Override |
| 187 | + @Nullable |
| 188 | + public MessageCodesResolver getMessageCodesResolver() { |
| 189 | + // This implementation is empty to keep compatibility with spring 4 applications. |
| 190 | + return null; |
| 191 | + } |
87 | 192 | }
|
0 commit comments