Skip to content

Commit

Permalink
✨ spring-boot-demo-orm-mybatis 完成
Browse files Browse the repository at this point in the history
  • Loading branch information
xkcoding committed Nov 8, 2018
1 parent d34f251 commit 0032ec8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions spring-boot-demo-orm-mybatis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,43 @@ public class SpringBootDemoOrmMybatisApplication {
}
```

## application.yml

```yaml
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/spring-boot-demo?useUnicode=true&characterEncoding=UTF-8&useSSL=false&autoReconnect=true&failOverReadOnly=false&serverTimezone=GMT%2B8
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.zaxxer.hikari.HikariDataSource
initialization-mode: always
continue-on-error: true
schema:
- "classpath:db/schema.sql"
data:
- "classpath:db/data.sql"
hikari:
minimum-idle: 5
connection-test-query: SELECT 1 FROM DUAL
maximum-pool-size: 20
auto-commit: true
idle-timeout: 30000
pool-name: SpringBootDemoHikariCP
max-lifetime: 60000
connection-timeout: 30000
logging:
level:
com.xkcoding: debug
com.xkcoding.orm.mybatis.mapper: trace
mybatis:
configuration:
# 下划线转驼峰
map-underscore-to-camel-case: true
mapper-locations: classpath:mappers/*.xml
type-aliases-package: com.xkcoding.orm.mybatis.entity
```
## UserMapper.java
```java
Expand Down

0 comments on commit 0032ec8

Please sign in to comment.