(仿牛客网) #https://spring.io/ ServerProperties server.port=8080 server.servelet.context-path=/community #https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#appendix.application-properties #ThymeleafProperities spring.thymeleaf.cache=false # DataSourceProperties #MySQL数据库以及连接时(数据源,统一管理连接的工厂,能够统一初始化连接并且反复使用和连接上限) #数据库驱动,这是mysql的 spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver #mysql连接路径 spring.datasource.url=jdbc:mysql://localhost:3306/community?characterEncoding=utf-8&useSSL=false&serverTimezone=Hongkong spring.datasource.username=root spring.datasource.password=lihonghe #连接时类型 spring.datasource.type=com.zaxxer.hikari.HikariDataSource #最大连接数 spring.datasource.hikari.maximum-pool-size=15 #最小空闲连接 spring.datasource.hikari.minimum-idle=5 #超时,空闲多久关闭连接 spring.datasource.hikari.idle-timeout=30000 # MybatisProperties #映射文件的存放位置 classpath是target下的classes文件,在resources下建的文件都会编译到target下的classes mybatis.mapper-locations=classpath:mapper/*.xml #指定实体类所在包包名 mybatis.type-aliases-package=com.practice.niuke.entity #启用自动生成主键 mybatis.configuration.useGeneratedKeys=true #使下划线命名方式和驼峰命名方式自动匹配 header_url headerUrl字段和属性 mybatis.configuration.mapUnderscoreToCamelCase=true # logger #把这个包的级别调为debug,降级之后方便调试xml,会打印每次查询之前运行的sql logging.level.com.practice=debug
##本来使用的好好的昨天一运行就出错了,一是不知道怎么回事mavean路径需要重新写,二是pom.xml重新复制了老师的文件,使得spring-boot-maven-plugin不爆红了,三是重新复制了application.properties的配置,明明是一样的,只不过之前的写了注释,然后就没问题了