From fc8ceb6b6a9aa9f533d4371dc68917d41bfa4252 Mon Sep 17 00:00:00 2001 From: "Yangkai.Shen" <237497819@qq.com> Date: Mon, 13 Nov 2017 21:14:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20mybatis-demo=20=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spring-boot-demo-mybatis/src/main/resources/application.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/spring-boot-demo-mybatis/src/main/resources/application.yml b/spring-boot-demo-mybatis/src/main/resources/application.yml index c8f7b18..ef91227 100644 --- a/spring-boot-demo-mybatis/src/main/resources/application.yml +++ b/spring-boot-demo-mybatis/src/main/resources/application.yml @@ -49,16 +49,19 @@ spring: log-slow-sql: true slow-sql-millis: 5000 merge-sql: true -#mybatis 配置 +# mybatis 配置 mybatis: type-aliases-package: com.xkcoding.springbootdemomybatis.model mapper-locations: classpath:mapper/*.xml -#通用 Mapper 配置 + # 配置项:开启下划线到驼峰的自动转换. 作用:将数据库字段根据驼峰规则自动注入到对象属性 + configuration: + map-underscore-to-camel-case: true +# 通用 Mapper 配置 mapper: not-empty: false identity: MYSQL mappers: com.xkcoding.springbootdemomybatis.util.MyMapper -#PageHelper 配置 +# PageHelper 配置 pagehelper: helper-dialect: mysql reasonable: true