001/*
002 * Copyright 2002-2016 the original author or authors.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      https://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package org.springframework.web.servlet.config.annotation;
018
019import java.util.List;
020
021import org.springframework.format.FormatterRegistry;
022import org.springframework.http.converter.HttpMessageConverter;
023import org.springframework.lang.Nullable;
024import org.springframework.validation.MessageCodesResolver;
025import org.springframework.validation.Validator;
026import org.springframework.web.method.support.HandlerMethodArgumentResolver;
027import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
028import org.springframework.web.servlet.HandlerExceptionResolver;
029
030/**
031 * An implementation of {@link WebMvcConfigurer} with empty methods allowing
032 * subclasses to override only the methods they're interested in.
033 *
034 * @author Rossen Stoyanchev
035 * @since 3.1
036 * @deprecated as of 5.0 {@link WebMvcConfigurer} has default methods (made
037 * possible by a Java 8 baseline) and can be implemented directly without the
038 * need for this adapter
039 */
040@Deprecated
041public abstract class WebMvcConfigurerAdapter implements WebMvcConfigurer {
042
043        /**
044         * {@inheritDoc}
045         * <p>This implementation is empty.
046         */
047        @Override
048        public void configurePathMatch(PathMatchConfigurer configurer) {
049        }
050
051        /**
052         * {@inheritDoc}
053         * <p>This implementation is empty.
054         */
055        @Override
056        public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
057        }
058
059        /**
060         * {@inheritDoc}
061         * <p>This implementation is empty.
062         */
063        @Override
064        public void configureAsyncSupport(AsyncSupportConfigurer configurer) {
065        }
066
067        /**
068         * {@inheritDoc}
069         * <p>This implementation is empty.
070         */
071        @Override
072        public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
073        }
074
075        /**
076         * {@inheritDoc}
077         * <p>This implementation is empty.
078         */
079        @Override
080        public void addFormatters(FormatterRegistry registry) {
081        }
082
083        /**
084         * {@inheritDoc}
085         * <p>This implementation is empty.
086         */
087        @Override
088        public void addInterceptors(InterceptorRegistry registry) {
089        }
090
091        /**
092         * {@inheritDoc}
093         * <p>This implementation is empty.
094         */
095        @Override
096        public void addResourceHandlers(ResourceHandlerRegistry registry) {
097        }
098
099        /**
100         * {@inheritDoc}
101         * <p>This implementation is empty.
102         */
103        @Override
104        public void addCorsMappings(CorsRegistry registry) {
105        }
106
107        /**
108         * {@inheritDoc}
109         * <p>This implementation is empty.
110         */
111        @Override
112        public void addViewControllers(ViewControllerRegistry registry) {
113        }
114
115        /**
116         * {@inheritDoc}
117         * <p>This implementation is empty.
118         */
119        @Override
120        public void configureViewResolvers(ViewResolverRegistry registry) {
121        }
122
123        /**
124         * {@inheritDoc}
125         * <p>This implementation is empty.
126         */
127        @Override
128        public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
129        }
130
131        /**
132         * {@inheritDoc}
133         * <p>This implementation is empty.
134         */
135        @Override
136        public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) {
137        }
138
139        /**
140         * {@inheritDoc}
141         * <p>This implementation is empty.
142         */
143        @Override
144        public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
145        }
146
147        /**
148         * {@inheritDoc}
149         * <p>This implementation is empty.
150         */
151        @Override
152        public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
153        }
154
155        /**
156         * {@inheritDoc}
157         * <p>This implementation is empty.
158         */
159        @Override
160        public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
161        }
162
163        /**
164         * {@inheritDoc}
165         * <p>This implementation is empty.
166         */
167        @Override
168        public void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
169        }
170
171        /**
172         * {@inheritDoc}
173         * <p>This implementation returns {@code null}.
174         */
175        @Override
176        @Nullable
177        public Validator getValidator() {
178                return null;
179        }
180
181        /**
182         * {@inheritDoc}
183         * <p>This implementation returns {@code null}.
184         */
185        @Override
186        @Nullable
187        public MessageCodesResolver getMessageCodesResolver() {
188                return null;
189        }
190
191}