java
aixp88
这个作者很懒,什么都没留下…
展开
-
jsoup 提取 html中的所有链接
try { Document doc = (Document) Jsoup.connect(url).get(); Elements links = ((Element) doc).select("a[href]"); for (Element link : links) { String l原创 2017-03-17 21:55:24 · 3327 阅读 · 0 评论 -
HttpClient发送get请求
HttpClient 4.5发送get请求示例代码import java.io.IOException;import org.apache.http.HttpResponse;import org.apache.http.HttpStatus;import org.apache.http.client.ClientProtocolException;import org.apache.htt原创 2017-03-16 13:52:56 · 505 阅读 · 0 评论 -
HttpClient4.5发送post请求
HttpClient4.5发送post请求示例代码import java.io.IOException;import java.io.UnsupportedEncodingException;import java.util.ArrayList;import java.util.List;import org.apache.http.HttpResponse;import org.apac原创 2017-03-16 20:53:42 · 3765 阅读 · 0 评论 -
springboot使用thymeleaf 解析异常
在使用springboot的过程中,如果使用thymeleaf作为模板文件,则要求HTML格式必须为严格的html5格式,必须有结束标签,否则会报错!解决办法如下:1、你可以使用严格的标签,也就是每个标签都有结束标签,这种可能比较麻烦 2、在application.properties中增加spring.thymeleaf.content-type=text/html spring.thymel原创 2017-06-02 22:31:59 · 11892 阅读 · 3 评论