All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.healthy.common.mybatis.pageable.PageParamArgumentResolver Maven / Gradle / Ivy

There is a newer version: 2.0.0-M1
Show newest version
package com.healthy.common.mybatis.pageable;

import com.healthy.common.model.domain.PageParam;
import org.springframework.core.MethodParameter;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.support.WebDataBinderFactory;
import org.springframework.web.context.request.NativeWebRequest;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.ModelAndViewContainer;

/**
 * 分页参数解析器
 *
 * @author xm.z
 */
public interface PageParamArgumentResolver extends HandlerMethodArgumentResolver {

	/**
	 * Resolves a {@link PageParam} method parameter into an argument value from a given
	 * request.
	 * @param parameter the method parameter to resolve. This parameter must have
	 * previously been passed to {@link #supportsParameter} which must have returned
	 * {@code true}.
	 * @param mavContainer the ModelAndViewContainer for the current request
	 * @param webRequest the current request
	 * @param binderFactory a factory for creating {@link WebDataBinder} instances
	 * @return the resolved argument value.
	 * @throws Exception ex
	 */
	@NonNull
	@Override
	PageParam resolveArgument(MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer,
			NativeWebRequest webRequest, @Nullable WebDataBinderFactory binderFactory) throws Exception;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy