
java
IT界摸鱼人
这个作者很懒,什么都没留下…
展开
-
map极简模式实现策略模式
map极简模式实现策略模式原创 2022-01-20 17:06:44 · 767 阅读 · 0 评论 -
List<user> 根据 pwd属性做去重,直接看代码,
// 根据pwd去重// 利用 TreeSet 的排序去重构造函数来达到去重元素的目的List<User> userSet= users.stream().collect(Collectors.collectingAndThen(Collectors.toCollection( () -> new TreeSet<>(Compar...原创 2019-04-29 15:07:45 · 321 阅读 · 0 评论 -
XStream 工具类
话不多说,直接上代码首先下载jar包 <!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream --><dependency> <groupId>com.thoughtworks.xstream</groupId> <arti...原创 2019-09-03 21:59:16 · 1226 阅读 · 0 评论 -
普通工具类调用Spring 管理的容器
方法一:原创 2019-09-27 15:20:49 · 257 阅读 · 0 评论 -
Spring 获取bean 工具类
上代码:@Componentpublic class SpringContextUtil implements ApplicationContextAware { private static ApplicationContext applicationContext; @Override public void setApplicationContext(App...翻译 2019-09-27 16:16:25 · 297 阅读 · 0 评论 -
Feign调用外部系统接口
上代码public interface TestpApi { /** *调用外部系统 * @param data 请求数据 * @param sysCode * @return */ @RequestLine("POST /test/find") @Headers({"Content-Type: applic...原创 2019-09-27 16:22:46 · 2949 阅读 · 0 评论 -
List 分批处理
public interface BatchHandlerInterface<T> { /** * 分批回调方法 * */ public void handler(List<T> subList);}--------------------------------------------------------public abst...原创 2019-10-11 12:21:57 · 195 阅读 · 1 评论