SpringBoot的properties文件简易版

application.properties:
#设置开发环境,使用application-dev.properties文件
spring.profiles.active=dev


application-dev.properties:
##服务端口号
server.port=80
##druid连接池配置
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/mybatis_plus?serverTimezone=Asia/Shanghai&characterEncoding=utf-8
spring.datasource.username=root
spring.datasource.password=9237

##别名包
mybatis.type-aliases-package=com.bunfly.model
##扫描映射文件
mybatis.mapper-locations=classpath:mapper/*/*.xml

猜你喜欢

转载自blog.csdn.net/weixin_52877849/article/details/115013342