本文共 1195 字,大约阅读时间需要 3 分钟。
8089
/Student
,用于指定项目部署路径,访问时需通过http://localhost:8089/Student
Reachtest
jdbc:mysql://localhost:3306/Student4
root
,密码root
com.mysql.cj.jdbc.Driver
time-between-eviction-runs-millis
): 600000 毫秒(即10分钟)minEvictableIdleTimeMillis
): 300000 毫秒(即30分钟)SELECT 'x'
false
。这保证了数据库查询结果是实时获取,避免了缓存带来的数据延迟或一致性问题templates/
目录为模板文件的前缀.html
,默认模板文件类型true
,确保表达式式正确解析classpath:mapping/*.xml
,指明MyBatis配置文件的存放位置com.example.demo.vo
包中定义alias,用于简化实体类引用call-setters-on-nulls: true
:对null
字段调用调用者方法cache-enabled: false
:关闭MyBatis缓存功能cache: false
以防产生数据不一致问题test-while-idle: true
与test-on-return: false
结合使用转载地址:http://wlirz.baihongyu.com/