org.zodiac.autoconfigure.mybatisplus.MybatisPlusConfigWebFluxAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.mybatisplus;
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.reactive.config.WebFluxConfigurer;
import org.springframework.web.reactive.result.method.annotation.ArgumentResolverConfigurer;
import org.zodiac.mybatisplus.web.WebFluxPageArgumentResolver;
@SpringBootConfiguration
@ConditionalOnWebApplication(type = Type.REACTIVE)
@AutoConfigureAfter(value = MyBatisPlusConfigAutoConfiguration.class)
@ConditionalOnClass(value = {org.apache.ibatis.session.SqlSessionFactory.class, org.mybatis.spring.SqlSessionFactoryBean.class})
public class MybatisPlusConfigWebFluxAutoConfiguration implements WebFluxConfigurer {
/**
* page 解析器。
* @param configurer 解析配置器
*/
@Override
public void configureArgumentResolvers(ArgumentResolverConfigurer configurer) {
configurer.addCustomResolver(new WebFluxPageArgumentResolver());
}
}