yml的配置

# LOGGING
logging:
  config: logback.xml
  file: log/ChangHong.log
 # Log file name. For instance `myapp.log`
  path: log/
 # Location of the log file. For instance `/var/log`

#AUTO-CONFIGURATION
spring:
 autoconfigure:

# THYMELEAF (ThymeleafAutoConfiguration)
  thymeleaf:
    cache: true
 # Enable template caching.
    check-template: true
 # Check that the template exists before rendering it.
    check-template-location: true
 # Check that the templates location exists.
    content-type: text/html
 # Content-Type value.
    enabled: true
 # Enable MVC Thymeleaf view resolution.
    encoding: UTF-8
 # Template encoding.
    excluded-view-names:
 # Comma-separated list of view names that should be excluded from resolution.
    mode: HTML5
 # Template mode to be applied to templates. See also StandardTemplateModeHandlers.
    prefix: /
 # Prefix that gets prepended to view names when building a URL.
    suffix: .html
 # Suffix that gets appended to view names when building a URL.
#spring.thymeleaf.template-resolver-order:
 # Order of the template resolver in the chain.
    view-names:
 # Comma-separated list of view names that can be resolved.

# SPRING WEB SERVICES (WebServicesProperties)
  webservices:
    path: /services
 # Path that serves as the base URI for the services.
#spring.webservices.servlet.init:
 # Servlet init parameters to pass to Spring Web Services.
    servlet:
      load-on-startup: -1
 # Load on startup priority of the Spring Web Services servlet.

# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
  datasource:
    continue-on-error: false
 # Do not stop if an error occurs while initializing the database.
#spring.datasource.data:  # Data (DML) script resource references.
#spring.datasource.data-username: root
 # User of the database to execute DML scripts (if different).
#spring.datasource.data-password: bogenmacher2qq
 # Password of the database to execute DML scripts (if different).
    driver-class-name: com.mysql.jdbc.Driver
 # Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
    name: ChangHong
 # Name of the datasource.
    username: root
    password: password
 # Login password of the database.
    platform: all
 # Platform to use in the schema resource (schema-${platform}.sql).
    separator: ;
 # Statement separator in SQL initialization scripts.
    sql-script-encoding: UTF-8
 # SQL scripts encoding.
    url: "jdbc:mysql://localhost:3306/ChangHong?useUnicode=true&characterEncoding=UTF-8&useSSL=false"
 # JDBC url of the database.
#spring.datasource.

# SPRING MVC (WebMvcProperties)
  mvc:
    async:
      request-timeout: 0
       # Amount of time (in milliseconds) before asynchronous request handling times out.
    date-format: yyyy-MM-dd
     # Date format to use. For instance `dd/MM/yyyy`.
    dispatch-trace-request: false
     # Dispatch TRACE requests to the FrameworkServlet doService method.
    dispatch-options-request: true
     # Dispatch OPTIONS requests to the FrameworkServlet doService method.
    favicon:
      enabled: true
       # Enable resolution of favicon.ico.
    formcontent:
      putfilter:
        enabled: true
         # Enable Spring's HttpPutFormContentFilter.
    ignore-default-model-on-redirect: true
     # If the content of the "default" model should be ignored during redirect scenarios.
    locale:
     # Locale to use. By default, this locale is overridden by the "Accept-Language" header.
    locale-resolver: accept-header
     # Define how the locale should be resolved.
    log-resolved-exception: false
     # Enable warn logging of exceptions resolved by a "HandlerExceptionResolver".
    #media-types:
     # *:
     # Maps file extensions to media types for content negotiation.
    message-codes-resolver-format:
     # Formatting strategy for message codes. For instance `PREFIX_ERROR_CODE`.
    servlet.load-on-startup: -1
     # Load on startup priority of the Spring Web Services servlet.
    #static-path-pattern: /resources/
     # Path pattern used for static resources.
    throw-exception-if-no-handler-found: true
     # If a "NoHandlerFoundException" should be thrown if no Handler was found to process a request.
    view:
      prefix: /resources/
      suffix: .html

猜你喜欢

转载自blog.csdn.net/qq_39879632/article/details/81839958
今日推荐