zoukankan      html  css  js  c++  java
  • spring-boot 中application.properties的各种配置

    ########################################################
    ###datasource connect mysql
    ########################################################
    spring.datasource.url = jdbc:mysql://localhost:3306/springboot_db
    spring.datasource.username = root
    spring.datasource.password = 521314
    spring.datasource.driverClassName = com.mysql.jdbc.Driver
    spring.datasource.max-active=20
    spring.datasource.max-idle=8
    spring.datasource.min-idle=8
    spring.datasource.initial-size=10


    ########################################################
    ### server
    ########################################################
    #server.port=8080
    #server.address= # bind to a specific NIC
    #server.session-timeout= # session timeout in seconds
    #the context path, defaults to '/'
    #server.context-path=/spring-boot
    #server.servlet-path= # the servlet path, defaults to '/'
    #server.tomcat.access-log-pattern= # log pattern of the access log
    #server.tomcat.access-log-enabled=false # is access logging enabled
    #server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers
    #server.tomcat.remote-ip-header=x-forwarded-for
    #server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)
    #server.tomcat.background-processor-delay=30; # in seconds
    #server.tomcat.max-threads = 0 # number of threads in protocol handler
    #server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding


    ########################################################
    ### Java Persistence Api
    ########################################################
    # Specify the DBMS
    spring.jpa.database = MYSQL
    # Show or not log for each sql query
    spring.jpa.show-sql = true
    # Hibernate ddl auto (create, create-drop, update)
    spring.jpa.hibernate.ddl-auto = update
    # Naming strategy
    #[org.hibernate.cfg.ImprovedNamingStrategy #org.hibernate.cfg.DefaultNamingStrategy]
    spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
    # stripped before adding them to the entity manager)
    spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect


    ########################################################
    ###THYMELEAF (ThymeleafAutoConfiguration)  引擎模版thymeleaf
    ########################################################
    #前缀 在classpath路径下的templates目录中有.html文件
    #spring.thymeleaf.prefix=classpath:/templates/
    #后缀
    spring.thymeleaf.suffix=.html
    #spring.thymeleaf.mode=LEGACYHTML5
    #spring.thymeleaf.mode=HTML5
    #spring.thymeleaf.encoding=UTF-8
    # ;charset=<encoding> is added
    #spring.thymeleaf.content-type=text/html
    # set to false for hot refresh
    #false关闭缓存
    spring.thymeleaf.cache=false


    ########################################################
    ###FREEMARKER (FreeMarkerAutoConfiguration) freemarker 模版
    ########################################################
    spring.freemarker.allow-request-override=false
    spring.freemarker.cache=false
    spring.freemarker.check-template-location=true
    spring.freemarker.charset=UTF-8
    spring.freemarker.content-type=text/html
    spring.freemarker.expose-request-attributes=false
    spring.freemarker.expose-session-attributes=false
    spring.freemarker.expose-spring-macro-helpers=false
    #spring.freemarker.prefix=
    #spring.freemarker.request-context-attribute=
    #spring.freemarker.settings.*=
    spring.freemarker.suffix=.ftl
    #spring.freemarker.template-loader-path=classpath:/templates/ #comma-separated list
    #spring.freemarker.view-names= # whitelist of view names that can be resolved

  • 相关阅读:
    第一次冲刺6
    人机交互课下作业
    第一次冲刺5
    第一次冲刺4
    第一次冲刺3
    第一次冲刺2
    第一次冲刺
    典型用户分析
    掌握 需求过程阅读笔记02
    掌握 需求过程阅读笔记01
  • 原文地址:https://www.cnblogs.com/fengjunming/p/7786789.html
Copyright © 2011-2022 走看看