com.fhs.trans.config.EasyTransMybatisFlexConfig Maven / Gradle / Ivy
package com.fhs.trans.config;
import com.fhs.core.trans.util.ReflectUtils;
import com.fhs.trans.extend.MybatisFlexSimpleTransDiver;
import com.mybatisflex.annotation.Id;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
/**
* mybatis plus适配器
*
* @author wanglei
*/
@Slf4j
@Configuration
public class EasyTransMybatisFlexConfig {
@Bean
@Primary
public MybatisFlexSimpleTransDiver MybatisPlusSimpleTransDiver() {
ReflectUtils.ID_ANNO.add(Id.class);
return new MybatisFlexSimpleTransDiver();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy