springboot默认读取application*.properties
#######spring配置#######
spring.profiles.active=dev //引入开发配置文件 application-dev.properties
##mvc配置
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
spring.thymeleaf.cache=false
spring.thymeleaf.enabled = false
## Mybatis 配置
mybatis.type-aliases-package=com.example.demo.domain //实体类
mybatis.mapper-locations=classpath:dao/*Mapper.xml
##logback日志
logging.config=classpath:logback-spring.xml
##数据库配置Druid
spring.datasource.type = com.alibaba.druid.pool.DruidDataSource
spring.datasource.druid.driver-class-name=oracle.jdbc.driver.OracleDriver
spring.datasource.druid.initialSize=1
spring.datasource.druid.maxActive=20
spring.datasource.druid.minIdle=1
spring.datasource.druid.maxWait=60000
spring.datasource.druid.timeBetweenEvictionRunsMillis=60000
spring.datasource.druid.minEvictableIdleTimeMillis=30000
spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL
spring.datasource.druid.testWhileIdle=true
spring.datasource.druid.testOnBorrow=false
spring.datasource.druid.testOnReturn=false
spring.datasource.druid.poolPreparedStatements=true
spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20
spring.datasource.druid.filters=stat,wall
springboot配置文件读取参考文档:
https://blog.csdn.net/thc1987/article/details/78789426
自定义读取配置文件也可用:java.util.Properties