server:
port: 8081
spring:
application:
name: item-service #给当前项目起名字
profiles:
active: dev #激活运行环境
datasource:
url: jdbc:mysql://${hm.db.host}:3307/hm-item?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
driver-class-name: com.mysql.cj.jdbc.Driver
username: root #数据库配置,每个微服务对应一个数据库
password: ${hm.db.pw}
mybatis-plus: #MyBatis的配置
configuration:
default-enum-type-handler: com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler
global-config:
db-config:
update-strategy: not_null
id-type: auto
logging:
level:
com.hmall: debug
pattern:
dateformat: HH:mm:ss:SSS
file:
path: "logs/${spring.application.name}" #日志文件保存目录
knife4j: #sweagger的配置
enable: true
openapi:
title: 黑马商城接口文档
description: "黑马商城商品接口文档"
email: zhanghuyi@itcast.cn
concat: 爷爷
url: https://www.itcast.cn
version: v1.0.2
group:
default:
group-name: default
api-rule: package
api-rule-resources:
- com.hmall.item.controller
博客内容均系原创,未经允许严禁转载!