MybatisConfiguration配置类

1
2
3
4
5
6
7
8
9
10
11
/**
* Mybatis配置类
*
* @author java@tedu.cn
* @version 0.0.1
*/
@MapperScan("cn.tedu.csmall.stock.webapi.mapper")//指定Mapper包
@Configuration
public class MybatisConfiguration {

}

mapper包接口

1
2
3
4
5
6
7
8
9
10
11
@Repository
public interface AttributeMapper {

int insert(Attribute attribute);//方法名绑定Mapper.XML文件属性id

int deleteById(Long id);

int deleteByIds(Long... ids);


}