zoukankan      html  css  js  c++  java
  • Springboot配置

    配置说明
    spring.datasource.type=com.alibaba.druid.pool.RayDruidDataSource
    spring.datasource.driver-class-name=com.mysql.jdbc.Driver
    ##下面为连接池的补充设置,应用到上面所有数据源中
    ##初始化大小,最小,最大
    spring.datasource.initialSize=10
    spring.datasource.minIdle=20
    spring.datasource.maxActive=50
    ##配置获取连接等待超时的时间
    spring.datasource.maxWait=2000
    ##配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
    spring.datasource.timeBetweenEvictionRunsMillis=3000
    ##配置一个连接在池中最小生存的时间,单位是毫秒
    spring.datasource.minEvictableIdleTimeMillis=300000
    ##校验SQL,Oracle配置 spring.datasource.validationQuery=SELECT 1 FROM DUAL,
    ##如果不配validationQuery项,则下面三项配置无用
    spring.datasource.validationQuery=SELECT 'x'
    spring.datasource.testWhileIdle=true
    spring.datasource.testOnBorrow=false
    spring.datasource.testOnReturn=false
    ## 打开PSCache
    spring.datasource.poolPreparedStatements=false
    ## 配置监控统计拦截的filters
    spring.datasource.filters=config
    spring.datasource.sql-script-encoding=utf-8
    
    ## mybatis config
    #配置domain实体对象所在的包,跟数据库表一一对应
    mybatis.typeAliasesPackage=com.raycloud.springboot.demo.common.domain
    #配置sql.xml路径
    mybatis.mapperLocations=classpath:mapper/*.xml
    mybatis.configuration.map-underscore-to-camel-case=true
    
    ## encoding config
    spring.http.encoding.charset=UTF-8
    spring.http.encoding.force=true
    spring.http.encoding.enabled=true
    server.tomcat.uri-encoding=UTF-8
    ## 日志文件
    logging.config=classpath:config/logging-config.xml
    
    ## active profile来 具体激活一个或者多个配置文件
    spring.profiles.active=@activatedProperties@
    
    ## 文件上传大小设置
    spring.http.multipart.maxFileSize=20Mb
    spring.http.multipart.maxRequestSize=100Mb
    ##配置访问路径 springboot版本 1.x 使用 server.context-path=/demo  2.x 使用 server.servlet.context-path=/demo
    server.context-path=/demo
    ##配置端口号
    server.port=8099
    
    #jsp,servlet修改后无需重新发布 热部署
    server.jsp-servlet.init-parameters.development=true
    

      

  • 相关阅读:
    LPC1788做U盘的时候对命令的响应
    一种比较简单的在USB U盘中访问nandflash的方法
    LPC1788的LCD接口驱动真彩屏
    lPC1788的GPIO驱动
    LPC1788定时器使用
    LPC1788系统时钟初始化
    LPC1788的IIC使用
    lPC1788驱动SDRAM
    LPC1788的内部EEPROM使用
    LPC1788的spi使用
  • 原文地址:https://www.cnblogs.com/ysg520/p/10877748.html
Copyright © 2011-2022 走看看