#设置 Spring Boot 应用的名称为 ???,这个名称通常用于服务注册与发现
spring.application.name=???
#服务器端口,指定 Spring Boot 内嵌服务器(如 Tomcat)运行的端口号为 8080。访问 Web 应用时,可以通过 http://localhost:8080 访问
server.port=8080
#数据库驱动,指定数据库的 JDBC 驱动类,这里使用 MySQL 的官方驱com.mysql.cj.jdbc.Driver(cj 代表 Connector/J)。
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#数据源名称,Spring Boot 默认不会使用 这个配置(可以忽略)
spring.datasource.name=defaultDataSource
#数据库连接地址,连接本地 MySQL 数据库 (localhost:3306);数据库名称写入括号内(),serverTimezone=UTC 指定数据库的时区为 UTC,避免时区问题
spring.datasource.url=jdbc:mysql://localhost:3306/()?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
#较全面链接
#jdbc:mysql://localhost:3306/( )?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
#数据库用户名&密码,密码为0开头需要加单引号,例如 '0123456'
spring.datasource.username=root
spring.datasource.password=123456
#自动更新数据库表结构
spring.jpa.hibernate.ddl-auto=update
#显示sql语句
spring.jpa.show-sql=true
#格式化显示Sql语句
spring.jpa.properties.hibernate.format_sql=true
#数据库语言配置,用于指定底层数据库方言的配置属性,主要用于适配不同数据库的 SQL 语法和特性差异(一般不需要)
#spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
# 配置mybatis实体和xml映射,路径为 resources 文件下的 mapper 文件下的所有 xml文件,classpath: 表示 resources 的目录
mybatis.mapper-locations=classpath:mapper/*.xml
#数据库配置日志在控制台打印
mybatis.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
#数据库 带下划线字段名 自动转为 驼峰命名,user_id -> userId
mybatis.configuration.map-underscore-to-camel-case=true