223 Star 847 Fork 420

baomidou/mybatisplus-spring-boot

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
application.yml 1.96 KB
Copy Edit Raw Blame History
聂秋荣 authored 2018-01-25 22:47 . sql注入器,主键生成器.
#app
server:
port: 8080
#spring
spring:
devtools:
restart:
enabled: false
# H2 DATABASE CONFIG
datasource:
type: com.zaxxer.hikari.HikariDataSource
schema: classpath:/db/schema-h2.sql
data: classpath:/db/data-h2.sql
url: jdbc:h2:mem:testdb
username: sa
password: sa
platform: h2
initialize: true
continue-on-error: true
h2:
console:
enabled: true
path: /console
#mybatis
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
#实体扫描,多个package用逗号或者分号分隔
typeAliasesPackage: com.baomidou.springboot.entity
typeEnumsPackage: com.baomidou.springboot.entity.enums
global-config:
#主键类型 0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
id-type: 2
#字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
field-strategy: 2
#驼峰下划线转换
db-column-underline: true
#刷新mapper 调试神器
refresh-mapper: true
#数据库大写下划线转换
#capital-mode: true
#序列接口实现类配置,不在推荐使用此方式进行配置,请使用自定义bean注入
key-generator: com.baomidou.mybatisplus.incrementer.H2KeyGenerator
#逻辑删除配置(下面3个配置)
logic-delete-value: 0
logic-not-delete-value: 1
#自定义sql注入器,不在推荐使用此方式进行配置,请使用自定义bean注入
sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
#自定义填充策略接口实现,不在推荐使用此方式进行配置,请使用自定义bean注入
meta-object-handler: com.baomidou.springboot.MyMetaObjectHandler
#自定义SQL注入器
#sql-injector: com.baomidou.springboot.xxx
# SQL 解析缓存,开启后多租户 @SqlParser 注解生效
sql-parser-cache: true
configuration:
map-underscore-to-camel-case: true
cache-enabled: false
#logging
logging:
level: warn
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/baomidou/mybatisplus-spring-boot.git
git@gitee.com:baomidou/mybatisplus-spring-boot.git
baomidou
mybatisplus-spring-boot
mybatisplus-spring-boot
2.x

Search

0d507c66 1850385 C8b1a773 1850385