![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工具类
时不我予de哀愁
这个作者很懒,什么都没留下…
展开
-
ElasticSearch工具类
先把需要用的类注入进来这两个类在meaven导入的时候就注入到spring了 @Autowired private TransportClient transportClient; private static TransportClient client; 根据ID查找elasticsearch是否存在某条数据 /** * 指定ID,查询数据 * @param index * @param type * @param id * @par原创 2021-08-20 15:10:30 · 284 阅读 · 0 评论 -
工具类:java构建一次post请求并返回结果、从输入流中读取数据
public class StaffInfoUtil { /** * 发送post请求 * * @param params 参数 * @param requestUrl 请求地址 * @param authorization 授权书 * @return 返回结果 * @throws IOException * @author */ public static String send原创 2021-08-20 14:01:43 · 797 阅读 · 0 评论 -
工具类:内容有大量的html标签,去除html标签
public static String delHTMLTag(String htmlStr) { String regEx_style = "<style[^>]*?>[\\s\\S]*?<\\/style>"; //定义style的正则表达式 String regEx_html = "<[^>]+>"; //定义HTML标签的正则表达式 Pattern p_style = Pattern.compile(.原创 2021-08-20 13:58:34 · 71 阅读 · 0 评论