1. 程式人生 > >SpringBoot的yml配置檔案

SpringBoot的yml配置檔案

1、在src\main\resources下建立application.yml配置檔案

spring: 
  datasource: 
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/test?characterEncoding=UTF-8
    username: root
    password: root
  thymeleaf:
    mode: HTML5
    encoding: UTF-8
    content-type: text/html
name: cppdy123