java.lang.IllegalArgumentException: DefaultSerializer requires a Serializable payload but received
要缓存的 Java 对象必须实现 Serializable 接口,因为 Spring 会将对象先序列化再存入 Redis,比如的com.defonds.bdp.city.bean.City 类,
如果不实现 Serializable 的话将会遇到类似这种错误:
nested exception is java.lang.IllegalArgumentException: DefaultSerializer requires a Serializable payload but received an object of type [com.defonds.bdp.city.bean.City]]。