30 lines
746 B
Java
30 lines
746 B
Java
package com.mosty.sjzx.mybatisplus;
|
|
|
|
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
|
|
/**
|
|
* mybatis-plus配置类
|
|
*
|
|
* @author Lhh
|
|
*/
|
|
@EnableTransactionManagement(proxyTargetClass = true)
|
|
@Configuration
|
|
@MapperScan("com.mosty.wqzx.mapper")
|
|
public class MybatisPlusConfig {
|
|
|
|
/**
|
|
* 元对象字段填充控制器
|
|
* https://baomidou.com/guide/auto-fill-metainfo.html
|
|
*/
|
|
@Bean
|
|
public MetaObjectHandler metaObjectHandler() {
|
|
return new CreateAndUpdateMetaObjectHandler();
|
|
}
|
|
|
|
|
|
}
|