
spring
力先生
这个作者很懒,什么都没留下…
展开
-
RedisTemplate中opsForValue和opsForList方法使用
一、opsForValue用法 key:字符串,value:可以是任意对象Object(例如String、具体对象如自定义类Student等),一个key只能对应一个value。 1)value为String类型示例: //赋值方法 redisTemplate.opsForValue().set("username1","wangxinli"); redisTemplate.opsForValue().set("username2","yanxiaotang"); redisTemplate.ops原创 2020-06-19 15:42:51 · 10099 阅读 · 3 评论 -
Spring原理简述
一、什么是Spring容器? Spring容器,也称Spring Ioc容器或bean容器,是Spring框架的核心,Srping容器对很多人来说是比较抽象难以理解的; 1、从概念层面讲,对象的创建、初始化以及销毁的整个生命周期都交由Spring容器去管理,大大减少了开发的工作量; 2、从代码层面讲,一个Spring容器就是一个实现了ApplicationContext接口的类的一个实例,即一个Spring容器就是一个AlicaitonContext(对象) ApplicationContext conte原创 2020-06-10 12:02:09 · 217 阅读 · 0 评论