Browse Source
Introduced dedicated callback interfaces to customize the HandlerMethodArgumentResolver instances registered by SpringDataWebConfiguration. This allows bean definition registration of those customizer interfaces instead of having to extend a configuration class. Original pull request: #208.pull/173/merge
5 changed files with 166 additions and 5 deletions
@ -0,0 +1,35 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2017 the original author or authors. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
* you may not use this file except in compliance with the License. |
||||||
|
* You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
package org.springframework.data.web.config; |
||||||
|
|
||||||
|
import org.springframework.data.web.PageableHandlerMethodArgumentResolver; |
||||||
|
|
||||||
|
/** |
||||||
|
* Callback interface that can be implemented by beans wishing to customize the |
||||||
|
* {@link PageableHandlerMethodArgumentResolver} configuration. |
||||||
|
* |
||||||
|
* @author Vedran Pavic |
||||||
|
*/ |
||||||
|
public interface PageableHandlerMethodArgumentResolverCustomizer { |
||||||
|
|
||||||
|
/** |
||||||
|
* Customize the pageable resolver |
||||||
|
* |
||||||
|
* @param pageableResolver the {@link PageableHandlerMethodArgumentResolver} to customize |
||||||
|
*/ |
||||||
|
void customize(PageableHandlerMethodArgumentResolver pageableResolver); |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,35 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2017 the original author or authors. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
* you may not use this file except in compliance with the License. |
||||||
|
* You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
*/ |
||||||
|
package org.springframework.data.web.config; |
||||||
|
|
||||||
|
import org.springframework.data.web.SortHandlerMethodArgumentResolver; |
||||||
|
|
||||||
|
/** |
||||||
|
* Callback interface that can be implemented by beans wishing to customize the |
||||||
|
* {@link SortHandlerMethodArgumentResolver} configuration. |
||||||
|
* |
||||||
|
* @author Vedran Pavic |
||||||
|
*/ |
||||||
|
public interface SortHandlerMethodArgumentResolverCustomizer { |
||||||
|
|
||||||
|
/** |
||||||
|
* Customize the sort resolver |
||||||
|
* |
||||||
|
* @param sortResolver the {@link SortHandlerMethodArgumentResolver} to customize |
||||||
|
*/ |
||||||
|
void customize(SortHandlerMethodArgumentResolver sortResolver); |
||||||
|
|
||||||
|
} |
||||||
Loading…
Reference in new issue