org.zodiac.autoconfigure.mybatisplus.MybatisPlusConfigWebMvcAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.mybatisplus;
import java.util.List;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.zodiac.mybatisplus.web.WebMvcPageArgumentResolver;
@SpringBootConfiguration
@ConditionalOnWebApplication(type = Type.SERVLET)
@AutoConfigureAfter(value = MyBatisPlusConfigAutoConfiguration.class)
@ConditionalOnClass(value = {org.apache.ibatis.session.SqlSessionFactory.class, org.mybatis.spring.SqlSessionFactoryBean.class})
public class MybatisPlusConfigWebMvcAutoConfiguration implements WebMvcConfigurer {
/**
* page 解析器。
* @param argumentResolvers 解析器列表
*/
@Override
public void addArgumentResolvers(List argumentResolvers) {
argumentResolvers.add(new WebMvcPageArgumentResolver());
}
}