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

org.zodiac.autoconfigure.mybatisplus.MybatisPlusConfigWebMvcAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
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());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy