forked from rzdata/demo-empty
新增接口: BaseRepository
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package net.rzdata.demo.trait;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
public abstract class BaseRepository<T, M extends BaseMapper<T>> {
|
||||
|
||||
private final transient M mapper;
|
||||
|
||||
public BaseRepository(M mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
public M get() {
|
||||
return this.mapper;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user