![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
性能优化
文章平均质量分 83
king.sheng
这个作者很懒,什么都没留下…
展开
-
Java 8 新特性之 Stream
stream of elements -----> filter-> sorted-> map-> collectList transactionsIds =widgets.stream().filter(b -> b.getColor() == RED).sorted((x,y) -> x.getWeight() - y.getWeight()).mapToInt(Widget::getWeight).sum();1.filterList strings原创 2021-01-22 14:47:39 · 157 阅读 · 2 评论 -
自定义注解+AOP实现缓存
使用场景:解耦业务实现和基础组件功能代码@MyCache(key = "test_'+#code")public TempObject getTempObject(String code){}自定义注解:@Retention(RetentionPolicy.RUNTIME)@Target(ElementType.METHOD)public @interface MyCache {...原创 2020-01-02 14:01:08 · 459 阅读 · 0 评论