springboot
LXJ199869
这个作者很懒,什么都没留下…
展开
-
springboot缓存
缓存配置: @Cacheable注解(缓存添加) @CachePut注解:既调用方法,又缓存数据(调用方法之后更新缓存) @CacheEvict注解: 运行流程: @Cacheable标注的方法执行之前: 先查询Cache(缓存组件),按照cacheNames指定的名字获取;(CacheManager先获取相应的缓存),第一次获取如果没有Cache组件会自动创建 去Cache中根据key(默认就是方法的参数)查找缓存 如果没有查到缓存就调用目标方法 将目标方法的返回结果,放进缓存中原创 2020-08-04 23:07:30 · 103 阅读 · 0 评论 -
springboot整合mybatis
spring.datasource.data-username=root spring.datasource.data-password=123456 #springboot整合MySQL数据库时要加时区 spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8 spring.datasource.driver-class-原创 2020-08-04 22:29:17 · 126 阅读 · 0 评论