一般分为测试环境,开发环境,以及正式环境三个配置文件,单独管理,主配置文件中使用
来控制对应配置文件,常用springboot配置
server: port: 80 servlet: context-path: / tomcat: uri-encoding: utf-8 spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/db_ketang2?serverTimezone=GMT username: root password: 123456 mybatis: mapper-locations: classpath:mybatis/mapper/*.xml config-location: classpath:mybatis/config/mybatis-config.xml