- 后端:引入 MyBatis Plus 美滋滋

This commit is contained in:
YunaiV
2019-05-11 01:20:01 +08:00
parent 53fff39a6c
commit 25ecc25139
7 changed files with 37 additions and 17 deletions

View File

@@ -1,11 +1,10 @@
package cn.iocoder.mall.admin.dao;
import cn.iocoder.mall.admin.dataobject.AccessLogDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
@Repository
public interface AccessLogMapper {
void insert(AccessLogDO entity);
public interface AccessLogMapper extends BaseMapper<AccessLogDO> {
}

View File

@@ -7,9 +7,19 @@ spring:
password: ${MALL_MYSQL_PASSWORD}
# mybatis
mybatis:
config-location: classpath:mybatis-config.xml
mapper-locations: classpath:mapper/*.xml
#mybatis:
# config-location: classpath:mybatis-config.xml
# mapper-locations: classpath:mapper/*.xml
# type-aliases-package: cn.iocoder.mall.admin.dataobject
# mybatis-plus
mybatis-plus:
configuration:
map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
global-config:
db-config:
id-type: auto
mapper-locations: classpath*:mapper/*.xml
type-aliases-package: cn.iocoder.mall.admin.dataobject
# dubbo