移除mybaits-plus和h2内嵌数据库
parent
c39250182b
commit
45b25e7bfa
19
pom.xml
19
pom.xml
|
@ -18,7 +18,6 @@
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<mybatisplus.version>3.5.1</mybatisplus.version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,24 +38,6 @@
|
||||||
<artifactId>lombok</artifactId>
|
<artifactId>lombok</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- mybatis-plus 所需依赖 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
|
||||||
<version>${mybatisplus.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.baomidou</groupId>
|
|
||||||
<artifactId>mybatis-plus-generator</artifactId>
|
|
||||||
<version>${mybatisplus.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 使用h2内存数据库 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.h2database</groupId>
|
|
||||||
<artifactId>h2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba.fastjson2</groupId>
|
<groupId>com.alibaba.fastjson2</groupId>
|
||||||
<artifactId>fastjson2</artifactId>
|
<artifactId>fastjson2</artifactId>
|
||||||
|
|
|
@ -1,57 +1,6 @@
|
||||||
server:
|
server:
|
||||||
port: 81
|
port: 81
|
||||||
|
|
||||||
datasource:
|
|
||||||
username: muyu
|
|
||||||
password: 123456
|
|
||||||
# 如果需要数据本地化,则改成 file 方式
|
|
||||||
# jdbc:h2:mem:testDB;DB_CLOSE_DELAY=-1
|
|
||||||
url: jdbc:h2:file:~/vehicle/ali/openapi;AUTO_SERVER=TRUE;DB_CLOSE_DELAY=-1
|
|
||||||
driver-class-name: org.h2.Driver
|
|
||||||
h2:
|
|
||||||
# 开启这个配置就可以通过 web 页面访问了,例如:http://localhost:8080/springboot-h2/h2-console
|
|
||||||
console:
|
|
||||||
enabled: true
|
|
||||||
settings:
|
|
||||||
# 开启h2 console 跟踪 方便调试 默认 false
|
|
||||||
trace: true
|
|
||||||
# 允许console 远程访问 默认false
|
|
||||||
web-allow-others: true
|
|
||||||
# h2 访问路径上下文
|
|
||||||
path: /h2-console
|
|
||||||
sql:
|
|
||||||
init:
|
|
||||||
schema-locations: classpath:schema.sql
|
|
||||||
data-locations: classpath:data.sql
|
|
||||||
mode: always
|
|
||||||
continue-on-error: true
|
|
||||||
|
|
||||||
|
|
||||||
# mybatis-plus 配置
|
|
||||||
mybatis-plus:
|
|
||||||
mapper-locations: classpath*:/com.muyu.mapper/**/*.xml
|
|
||||||
#实体扫描,多个package用逗号或者分号分隔
|
|
||||||
typeAliasesPackage: com.dmo.entity
|
|
||||||
global-config:
|
|
||||||
#数据库相关配置
|
|
||||||
db-config:
|
|
||||||
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
|
|
||||||
id-type: AUTO
|
|
||||||
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断"
|
|
||||||
field-strategy: NOT_NULL
|
|
||||||
#驼峰下划线转换
|
|
||||||
column-underline: true
|
|
||||||
logic-delete-value: -1
|
|
||||||
logic-not-delete-value: 0
|
|
||||||
#原生配置
|
|
||||||
configuration:
|
|
||||||
# 打印sql
|
|
||||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
||||||
map-underscore-to-camel-case: true
|
|
||||||
cache-enabled: false
|
|
||||||
call-setters-on-nulls: true
|
|
||||||
jdbc-type-for-null: 'null'
|
|
||||||
|
|
||||||
# 日志输出配置
|
# 日志输出配置
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
|
Loading…
Reference in New Issue