zoukankan      html  css  js  c++  java
  • springboot学习二:配置文件配置

    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

  • 相关阅读:
    RMQ(非log2储存方法)
    2016年5月份学习记录
    NOIP200504循环
    膜拜acm大牛 虽然我不会这题,但是AC还是没有问题的~(转自hzwer)
    最长公共子序列的长度
    菜鸟,大牛和教主三者的区别(转自hzwer)
    NOIP201205Vigenère密码
    NOIP200503采药
    公路乘车
    NOIP200902分数线划定
  • 原文地址:https://www.cnblogs.com/ctsx/p/10275773.html
Copyright © 2011-2022 走看看