spring
lovesimly
这个作者很懒,什么都没留下…
展开
-
@interface使用
1.类级别 @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface Element {int id();String type();} 2.参数字段@Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) publi原创 2016-05-18 15:37:54 · 258 阅读 · 0 评论 -
Spring Cache
缓存是实际工作中非常常用的一种提高性能的方法, 我们会在许多场景下来使用缓存。本文通过一个简单的例子进行展开,通过对比我们原来的自定义缓存和 spring 的基于注释的 cache 配置方法,展现了 spring cache 的强大之处,然后介绍了其基本的原理,扩展点和使用场景的限制。通过阅读本文,你应该可以短时间内掌握 spring 带来的强大缓存技术,在很少的配置下即可给既有代码提转载 2016-10-26 13:53:01 · 191 阅读 · 0 评论 -
new类加载spring托管的bean
1.util@Componentpublic class SpringContextUtil implements ApplicationContextAware { private static ApplicationContext applicationContext; @Override public void setApplicatio原创 2017-07-12 18:08:01 · 549 阅读 · 0 评论