application.yml配置
server:
port:80
context-path:/
spring:
datasource:
driver-class-name:com.mysql.jdbc.Driver
url:jdbc:mysql://localhost:3306/db_book
username:root
password:123456
jpa:
hibernate:
ddl-auto:update
show-sql:true
使用application.properties配置如下:
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/db_book
spring.datasource.username=root
spring.datasource.password=123456
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
对于配置,一般个人是不会记,在网上学习视频的时候知道一共好东西,就是在eclipse里安装一个叫STS的插件,有代码提示的。