¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.yuanchu.limslaboratory.mybatis_config; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.DbType; |
| | | import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor; |
| | | import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | |
| | | @Configuration |
| | | public class MyBatisPlusConfig { |
| | | |
| | | /** |
| | | * éè¦é
ç½®æ¦æªå¨ï¼ä¸ç¶å¨AddDeviceä¸çtotalæ æ³è·åå° |
| | | * @return |
| | | */ |
| | | @Bean |
| | | public MybatisPlusInterceptor mybatisPlusInterceptor(){ |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | // ä¹è§é |
| | | interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor()); |
| | | // å页é
ç½® |
| | | interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); |
| | | return interceptor; |
| | | } |
| | | } |