Spring Boot的配置文件
server.servlet.context-path=/ch6_5
###
##数据源信息配置
###
#数据库地址
spring.datasource.url=jdbc:mysql://localhost:3306/springbootjpa?useSSL=false&characterEncoding=utf8
#数据库MySQL为8.x时,url为jdbc:mysql://localhost:3306/springbootjpa?serverTimezone=Asia/Beijing&characterEncoding=utf-8
#数据库用户名
spring.datasource.username=root
#数据库密码
spring.datasource.password=wgw63414
#数据库驱动
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
#数据库MySQL为8.x时,驱动类为com.mysql.cj.jdbc.Driver
spring.jackson.serialization.indent-output=true
#让控制器输出的JSON字符串格式更美观
测试控制器返回的JSON字符串的效果