vehicle/src/main/resources/application.yml

94 lines
2.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

server:
port: 81
spring:
mvc:
static-path-pattern: /static/**
datasource:
username: muyu
password: 123456
# 如果需要数据本地化,则改成 file 方式
# jdbc:h2:mem:testDB;DB_CLOSE_DELAY=-1
url: jdbc:h2:file:~/vehicle/db;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:
level:
com.muyu: DEBUG
com.muyu.service: DEBUG
com.muyu.mapper: DEBUG
com.muyu.vehicle: DEBUG
root: INFO
org:
springframework:
security: WARN
web: ERROR
file:
path: ./logs
name: './logs/vehicle.log'
pattern:
file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n'
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n'
# http调用框架
forest:
max-connections: 1000 # 连接池最大连接数
connect-timeout: 3000 # 连接超时时间,单位为毫秒
read-timeout: 3000 # 数据读取超时时间,单位为毫秒
variables:
adminHost: ${mqtt.admin.host}
adminTopicUri: ${mqtt.admin.topic-uri}
log-enabled: false
# 服务器配置
mqtt:
server:
host: tcp://fluxmq.muyu.icu:1883
topic: test1
admin:
host: http://127.0.0.1:${server.port}
topic-uri: /verify/vehicleConnection