Redis缓存设计案例
type
Post
status
Published
date
Jan 6, 2021
slug
summary
基本的 Redis 缓存和回写操作示例
tags
Redis
category
技术分享
icon
password

查询

查询先查 Reids
  • 先从 Redis 里查询,如果有数据直接返回,没有再去查询 Mysql
  • 从 MySQL 查询到数据后,需要将数据写回 Redis 以保障下一次缓存命中
    SSM框架整合:分层配置和整合
    type
    Post
    status
    Published
    date
    Jan 2, 2021
    slug
    summary
    经典SSM框架整合和基础开发环境搭建,MVC三层按层次配置清晰详尽
    tags
    开发
    category
    技术分享
    icon
    password

    创建 WEB 项目


    Web模块支持

    • 在 IDEA 中创建 Maven 项目,添加 web模板,或在一个普通 Maven 项目中添加 Web模块支持
    Unknown system variable 'query_cache_size’
    type
    Post
    status
    Published
    date
    Jan 23, 2021
    slug
    summary
    使用 Mybatis 时启动报错
    tags
    category
    Bug 记录
    icon
    password

    保留现场

    notion image

    探究原因

    mysql-connecter-java的版本过低,很显然是数据库驱动程序与数据库版本不对应
    Invalid bound statement (not found)
    type
    Post
    status
    Published
    date
    Jan 9, 2021
    slug
    summary
    使用 Mybatis 时启动报错
    tags
    category
    Bug 记录
    icon
    password

    保留现场

    notion image

    探究原因

    XML 映射文件和 Mybatis 的接口文件没有产生映射
    Maven 依赖和工作空间有关的异常
    type
    Post
    status
    Published
    date
    Dec 5, 2020
    slug
    summary
    例如依赖飘红,添加了依赖代码中却无法使用功能包等情况
    tags
    category
    Bug 记录
    icon
    password

    方法 1

    科学上网
    IDEA 中配置代理

    方法 2

    Java 四种本地文件拷贝方式比较和测试
    type
    Post
    status
    Published
    date
    Jul 13, 2020
    slug
    summary
    学习完 Java 中 NIO 的基本使用,总结了四种最基本的本地文件拷贝方式,并简单比较性能
    tags
    IO
    category
    技术分享
    icon
    password

    准备工作


    为了便于测试,定义一个文件拷贝的接口让测试类去继承它:
     public interface IFileCopy {      void copyFile(File source, File dest); }