java實現(xiàn)解析json復雜數(shù)據(jù)的方法詳解
一、概述
接前兩篇
我們已經(jīng)有了解析json數(shù)據(jù)的幾種思路,下面介紹的方法是最少依賴
情況下的字符串解析, 流程如圖:
二、數(shù)據(jù)預覽
接口json數(shù)據(jù)
{"code":200,"message":"success","traceId":"338267ed-b95d-4445-8aa3-124b37bc19f6","data":{"list":[{"articleId":135576948,"title":"記csv、parquet數(shù)據(jù)預覽一個bug的解決","description":"工作中遇到通過sparksession解析csv、parquet文件并預覽top100的需求。","url":"https://blog.csdn.net/qq_16127313/article/details/135576948","type":1,"top":false,"forcePlan":false,"viewCount":1206,"commentCount":0,"editUrl":"https://editor.csdn.net/md?articleId=135576948","postTime":"2024-01-13 23:22:17","diggCount":20,"formatTime":"2024.01.13","picList":["https://img-blog.csdnimg.cn/direct/02ca1a8caa824fd38996545d092792c9.jpeg"],"collectCount":15},{"articleId":135506426,"title":"基于jackson封裝的json字符串與javaBean對象轉(zhuǎn)換工具","description":"帶有API接口交互的web項目開發(fā)過程中,json字符串與javaBean對象之間的相互轉(zhuǎn)換是比較常見的需求,基于jackson ObjectMapper 實現(xiàn)的工具類較好的滿足了此需求。","url":"https://blog.csdn.net/qq_16127313/article/details/135506426","type":1,"top":false,"forcePlan":false,"viewCount":868,"commentCount":0,"editUrl":"https://editor.csdn.net/md?articleId=135506426","postTime":"2024-01-10 17:48:42","diggCount":8,"formatTime":"2024.01.10","picList":["https://img-blog.csdnimg.cn/direct/dee917c9ca45448f902b433f8210ca43.png"],"collectCount":9},{"articleId":135481476,"title":"基于Jackson封裝的JSON、Properties、XML、YAML 相互轉(zhuǎn)換的通用方法","description":"我們在yaml轉(zhuǎn)換成JSON、MAP、Properties通過引入實現(xiàn)了JSON、Properties、XML、YAML文件的相互轉(zhuǎn)換,具體封裝的類、方法如下:上面的實現(xiàn),定義了多個類、多個方法,使用不太方便,迫切需要精簡邏輯。","url":"https://blog.csdn.net/qq_16127313/article/details/135481476","type":1,"top":false,"forcePlan":false,"viewCount":1692,"commentCount":0,"editUrl":"https://editor.csdn.net/md?articleId=135481476","postTime":"2024-01-09 17:43:30","diggCount":31,"formatTime":"2024.01.09","picList":["https://img-blog.csdnimg.cn/direct/3f266e9d43b44592aa0e0c9417dada6f.png"],"collectCount":17},{"articleId":135469157,"title":"java解析json復雜數(shù)據(jù)的第三種思路","description":"接上篇java解析json復雜數(shù)據(jù)的兩種思路我們已經(jīng)通過解析返回json字符串得到數(shù)據(jù),現(xiàn)在改變思路,通過按照如下流程獲取:fill:#333;color:#333;color:#333;fill:none;接口API獲取JSONJSON轉(zhuǎn)XMLdom4j使用XPath解析xml。","url":"https://blog.csdn.net/qq_16127313/article/details/135469157","type":1,"top":false,"forcePlan":false,"viewCount":1498,"commentCount":0,"editUrl":"https://editor.csdn.net/md?articleId=135469157","postTime":"2024-01-09 08:34:07","diggCount":18,"formatTime":"2024.01.09","picList":["https://img-blog.csdnimg.cn/direct/ccd618b9e5194ed9a2f5848a8f3b8734.png"],"collectCount":19},{"articleId":135418954,"title":"java解析json復雜數(shù)據(jù)的兩種思路","description":"萌新小明最近新開了CSDN博客,蠢蠢欲動,迫不及待的發(fā)表了幾篇工作中積累下來的解決問題的涂鴉之作,看著訪問量慢慢漲起來,心中暗暗竊喜?,F(xiàn)在小明想每天23點記錄一下每篇文章的訪問量。。。","url":"https://blog.csdn.net/qq_16127313/article/details/135418954","type":1,"top":false,"forcePlan":false,"viewCount":1605,"commentCount":0,"editUrl":"https://editor.csdn.net/md?articleId=135418954","postTime":"2024-01-06 14:11:40","diggCount":18,"formatTime":"2024.01.06","picList":["https://img-blog.csdnimg.cn/direct/a409a0f4555c459fa05c00fd9ee0ea8c.png"],"collectCount":25}],"total":76}}
觀察接口返回數(shù)據(jù),我們看到json是經(jīng)過壓縮的,下面我們通過關鍵字符串替換方式將json節(jié)點數(shù)據(jù)轉(zhuǎn)換成一行行數(shù)據(jù)。
三、代碼實現(xiàn)
關鍵字符串主要有{ } ,
注意:因為是全文替換,有可能會存在內(nèi)容替換導致的獲取到的數(shù)據(jù),并非需要的情況
例如:上面的title、description節(jié)點數(shù)據(jù)有可能存在符合特征的字符串被替換,需要在實際調(diào)試中小心盡量避免。
1. 核心代碼
/** * 獲取urls */ private void printUrls() { try { String jsonBody = webClient.get() .uri("https://blog.csdn.net/community/home-api/v1/get-business-list?page=1&size=200&businessType=blog&username=qq_16127313") .acceptCharset(StandardCharsets.UTF_8) .accept(MediaType.APPLICATION_JSON) .retrieve() .bodyToMono(String.class) .block() .replace("{", "{\n") .replace("}", "}\n") .replace(",", ",\n"); try (InputStream is = new ByteArrayInputStream(jsonBody.getBytes(StandardCharsets.UTF_8))) { List<String> urls = IOUtils.readLines(is, StandardCharsets.UTF_8).stream().filter(line -> StringUtils.contains(line, "\"url\":")).map(n -> StringUtils.substringBetween(n, ":\"", "\",")).collect(Collectors.toList()); urls.stream().forEach(log::info); } } catch (IOException e) { log.error(e.getMessage(), e); } }
2. 字符串替換結(jié)果
{ "code":200, "message":"success", "traceId":"a212ea3c-f72b-4315-b620-22b8df2d3ce7", "data":{ "list":[{ "articleId":135576948, "title":"記csv、parquet數(shù)據(jù)預覽一個bug的解決", "description":"工作中遇到通過sparksession解析csv、parquet文件并預覽top100的需求。", "url":"https://blog.csdn.net/qq_16127313/article/details/135576948", "type":1, "top":false, "forcePlan":false, "viewCount":1206, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135576948", "postTime":"2024-01-13 23:22:17", "diggCount":20, "formatTime":"2024.01.13", "picList":["https://img-blog.csdnimg.cn/direct/02ca1a8caa824fd38996545d092792c9.jpeg"], "collectCount":15} , { "articleId":135506426, "title":"基于jackson封裝的json字符串與javaBean對象轉(zhuǎn)換工具", "description":"帶有API接口交互的web項目開發(fā)過程中,json字符串與javaBean對象之間的相互轉(zhuǎn)換是比較常見的需求,基于jackson ObjectMapper 實現(xiàn)的工具類較好的滿足了此需求。", "url":"https://blog.csdn.net/qq_16127313/article/details/135506426", "type":1, "top":false, "forcePlan":false, "viewCount":870, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135506426", "postTime":"2024-01-10 17:48:42", "diggCount":8, "formatTime":"2024.01.10", "picList":["https://img-blog.csdnimg.cn/direct/dee917c9ca45448f902b433f8210ca43.png"], "collectCount":9} , { "articleId":135481476, "title":"基于Jackson封裝的JSON、Properties、XML、YAML 相互轉(zhuǎn)換的通用方法", "description":"我們在yaml轉(zhuǎn)換成JSON、MAP、Properties通過引入實現(xiàn)了JSON、Properties、XML、YAML文件的相互轉(zhuǎn)換,具體封裝的類、方法如下:上面的實現(xiàn),定義了多個類、多個方法,使用不太方便,迫切需要精簡邏輯。", "url":"https://blog.csdn.net/qq_16127313/article/details/135481476", "type":1, "top":false, "forcePlan":false, "viewCount":1692, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135481476", "postTime":"2024-01-09 17:43:30", "diggCount":31, "formatTime":"2024.01.09", "picList":["https://img-blog.csdnimg.cn/direct/3f266e9d43b44592aa0e0c9417dada6f.png"], "collectCount":17} , { "articleId":135469157, "title":"java解析json復雜數(shù)據(jù)的第三種思路", "description":"接上篇java解析json復雜數(shù)據(jù)的兩種思路我們已經(jīng)通過解析返回json字符串得到數(shù)據(jù), 現(xiàn)在改變思路, 通過按照如下流程獲取:fill:#333;color:#333;color:#333;fill:none;接口API獲取JSONJSON轉(zhuǎn)XMLdom4j使用XPath解析xml。", "url":"https://blog.csdn.net/qq_16127313/article/details/135469157", "type":1, "top":false, "forcePlan":false, "viewCount":1501, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135469157", "postTime":"2024-01-09 08:34:07", "diggCount":18, "formatTime":"2024.01.09", "picList":["https://img-blog.csdnimg.cn/direct/ccd618b9e5194ed9a2f5848a8f3b8734.png"], "collectCount":19} , { "articleId":135418954, "title":"java解析json復雜數(shù)據(jù)的兩種思路", "description":"萌新小明最近新開了CSDN博客,蠢蠢欲動,迫不及待的發(fā)表了幾篇工作中積累下來的解決問題的涂鴉之作,看著訪問量慢慢漲起來,心中暗暗竊喜?,F(xiàn)在小明想每天23點記錄一下每篇文章的訪問量。。。", "url":"https://blog.csdn.net/qq_16127313/article/details/135418954", "type":1, "top":false, "forcePlan":false, "viewCount":1607, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135418954", "postTime":"2024-01-06 14:11:40", "diggCount":18, "formatTime":"2024.01.06", "picList":["https://img-blog.csdnimg.cn/direct/a409a0f4555c459fa05c00fd9ee0ea8c.png"], "collectCount":25} , { "articleId":135244727, "title":"java lambda表達式訓練題一", "description":"Lambda 表達式,也可稱為閉包,它是推動 Java 8 發(fā)布的最重要新特性。Lambda 允許把函數(shù)作為一個方法的參數(shù)(函數(shù)作為參數(shù)傳遞進方法中)。使用 Lambda 表達式可以使代碼變的更加簡潔緊湊。", "url":"https://blog.csdn.net/qq_16127313/article/details/135244727", "type":1, "top":false, "forcePlan":false, "viewCount":1734, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135244727", "postTime":"2023-12-27 18:07:30", "diggCount":7, "formatTime":"2023.12.27", "picList":["https://img-blog.csdnimg.cn/direct/d59c68b950754e879914b5319cd1b53f.png"], "collectCount":8} , { "articleId":135173565, "title":"二維碼初體驗 com.google.zxing 實現(xiàn)續(xù) - web api封裝", "description":"在 二維碼初體驗 com.google.zxing 實現(xiàn) 我們實現(xiàn)了二維碼的生成,但是大部分情況下,二維碼的相關功能是作為API接口來提供服務的。我們下面便演示在springboot、Knife4j下封裝api接口來實現(xiàn)二維碼生成功能。如何使用下面的備份文件恢復成原始的項目代碼,請移步查閱:神奇代碼恢復工具-over-", "url":"https://blog.csdn.net/qq_16127313/article/details/135173565", "type":1, "top":false, "forcePlan":false, "viewCount":2396, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135173565", "postTime":"2023-12-23 20:17:11", "diggCount":23, "formatTime":"2023.12.23", "picList":["https://img-blog.csdnimg.cn/direct/f0c994ca789a495a8c8c03d86d626f24.jpeg"], "collectCount":23} , { "articleId":135167613, "title":"二維碼初體驗 com.google.zxing 實現(xiàn)", "description":"Java 操作二維碼的開源項目很多,如 SwetakeQRCode、BarCode4j、Zxing 等,這邊以Zxing 為例進行介紹。選擇需要生成QR原始文件,支持 “清除空白行及空格” 以減少二維碼圖片大小。支持輸入文本內(nèi)容,直接生成二維碼代碼結(jié)構(gòu)QrCodeUI: 完整版本代碼SimpleQrCodeUI:簡化版本代碼如何使用下面的備份文件恢復成原始的項目代碼,請移步查閱:神奇代碼恢復工具-over-", "url":"https://blog.csdn.net/qq_16127313/article/details/135167613", "type":1, "top":false, "forcePlan":false, "viewCount":1779, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135167613", "postTime":"2023-12-23 13:52:23", "diggCount":6, "formatTime":"2023.12.23", "picList":["https://img-blog.csdnimg.cn/direct/d3eeac85857543869dce8967c570bdc4.jpeg"], "collectCount":11} , { "articleId":135135799, "title":"【隨筆】MD5加密字符串、文件apache、springframework實現(xiàn)", "description":"【代碼】【隨筆】MD5加密字符串、文件commons-codec、springframework實現(xiàn)。", "url":"https://blog.csdn.net/qq_16127313/article/details/135135799", "type":1, "top":false, "forcePlan":false, "viewCount":2205, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135135799", "postTime":"2023-12-21 17:29:54", "diggCount":9, "formatTime":"2023.12.21", "picList":["https://img-blog.csdnimg.cn/direct/dc26b7f1c731494f80c8c3b3badfa95d.jpeg"], "collectCount":9} , { "articleId":135087188, "title":"【隨筆】java工程中JSON 字符串格式化輸出", "description":"json字符串格式化輸出fastjson、gson、jackson實現(xiàn)。", "url":"https://blog.csdn.net/qq_16127313/article/details/135087188", "type":1, "top":false, "forcePlan":false, "viewCount":1935, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=135087188", "postTime":"2023-12-19 17:07:40", "diggCount":8, "formatTime":"2023.12.19", "picList":["https://img-blog.csdnimg.cn/direct/058249a1749e4ff5b62e1fcabf516c37.png"], "collectCount":6} , { "articleId":134502740, "title":"【備忘錄】Docker容器、鏡像刪除與資源清理命令", "description":"【代碼】【備忘錄】Docker容器刪除與資源清理命令。", "url":"https://blog.csdn.net/qq_16127313/article/details/134502740", "type":1, "top":false, "forcePlan":false, "viewCount":9017, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134502740", "postTime":"2023-11-20 18:02:20", "diggCount":0, "formatTime":"2023.11.20", "picList":["https://img-blog.csdnimg.cn/cf2b74076d334a419f2d02f98298b1f4.jpeg"], "collectCount":0} , { "articleId":134482704, "title":"如何解決swagger-editor在線接口調(diào)試時的跨域問題", "description":"實現(xiàn)監(jiān)聽8081端口,將請求轉(zhuǎn)發(fā)到 http://175.24.127.215:8080,重點是標紅的這段,實現(xiàn)添加允許跨域信息header。文章中,我們簡單了解了如何在docker運行應用,接下來我們實際操作的時候,便可能遇到接口調(diào)試不通的問題?,F(xiàn)在服務器B安裝nginx服務,客戶端A直接將請求發(fā)送到服務器B某端口,由nginx將請求轉(zhuǎn)發(fā)給接口C。C返回結(jié)果后,由nginx主動添加header信息,返回A。具體思路就是客戶端A需要訪問接口C,因跨域無法直接訪問。發(fā)現(xiàn)接口報錯,跨域調(diào)用被拒絕。", "url":"https://blog.csdn.net/qq_16127313/article/details/134482704", "type":1, "top":false, "forcePlan":false, "viewCount":10384, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134482704", "postTime":"2023-11-18 21:30:41", "diggCount":0, "formatTime":"2023.11.18", "picList":["https://img-blog.csdnimg.cn/e4632ffd035f4329b498c12d4b711db7.png"], "collectCount":1} , { "articleId":134352661, "title":"最簡WebClient 同步、異步調(diào)用示例", "description":"WebClient是Spring WebFlux模塊提供的一個非阻塞的基于響應式編程的進行Http請求的客戶端工具,從Spring5.0開始WebClient作為RestTemplete的替代品,有更好的響應式能力,支持異步調(diào)用,可以在Springboot項目中實現(xiàn)網(wǎng)絡請求。", "url":"https://blog.csdn.net/qq_16127313/article/details/134352661", "type":1, "top":false, "forcePlan":false, "viewCount":12968, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134352661", "postTime":"2023-11-11 20:03:41", "diggCount":0, "formatTime":"2023.11.11", "picList":["https://img-blog.csdnimg.cn/d9bc94f250394fbb8d2ad91ed576a103.jpeg"], "collectCount":1} , { "articleId":134278293, "title":"【springboot配置項動態(tài)刷新】與【yaml文件轉(zhuǎn)換為java對象】", "description":"springboot 配置文件一般以yaml方式保存,除了系統(tǒng)配置項如spring、server等外,還有我們自定義的配置項,方便系統(tǒng)啟動時自動注入。自定義的配置項一般是動態(tài)配置項,在系統(tǒng)運行過程中,可能需要在線修改,來實現(xiàn)自定義的配置項不停服更新,也就是類似于spring-cloud-starter-config的動態(tài)刷新。由于系統(tǒng)不重啟,無法通過自動注入的方式自動更新自定義配置, 這兒便需要我們手動加載yaml文件, 轉(zhuǎn)換為java對象, 將變化賦值到spring管理的對象中我們準備采用最常見的snakey", "url":"https://blog.csdn.net/qq_16127313/article/details/134278293", "type":1, "top":false, "forcePlan":false, "viewCount":12925, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134278293", "postTime":"2023-11-08 17:47:12", "diggCount":0, "formatTime":"2023.11.08", "picList":["https://img-blog.csdnimg.cn/0619b786fb574792acabe9cde207623c.png"], "collectCount":1} , { "articleId":134199137, "title":"Springboot JSP項目如何以war、jar方式運行", "description":"Spring Boot 官方不推薦使用JSP來作為視圖,但是仍有部分項目使用了JSP視圖,Springboot JSP項目運行方式有war、Jar兩種方式。如何使用下面的備份文件恢復成原始的項目代碼,請移步查閱:神奇代碼恢復工具三,準備工作1. pom.xml 引入組件2. application.yml 指定jsp配置application.yml四,war方式運行1. 修改pom.xml文件2. mvn執(zhí)行打包執(zhí)行后會在target目錄生成war包,拷貝出來后運行瀏覽器訪問: h", "url":"https://blog.csdn.net/qq_16127313/article/details/134199137", "type":1, "top":false, "forcePlan":false, "viewCount":12827, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134199137", "postTime":"2023-11-03 12:36:01", "diggCount":0, "formatTime":"2023.11.03", "picList":["https://img-blog.csdnimg.cn/b01be69e6ff64de29573d371fdda41e3.png"], "collectCount":0} , { "articleId":134168716, "title":"Spring RestTemplate 各種打開方式集錦", "description":"RestTemplate是一個執(zhí)行HTTP請求的同步阻塞式工具類,它僅僅只是在 HTTP 客戶端庫(例如 JDK HttpURLConnection,Apache HttpComponents,okHttp 等)基礎上,封裝了更加簡單易用的模板方法 API,方便程序員利用已提供的模板方法發(fā)起網(wǎng)絡請求和處理,能很大程度上提升我們的開發(fā)效率。其實Spring已經(jīng)為我們提供了一種簡單便捷的模板類來進行操作,它就是RestTemplate?,F(xiàn)如今的 IT 項目,由服務端向外發(fā)起網(wǎng)絡請求的場景,基本上處處可見!", "url":"https://blog.csdn.net/qq_16127313/article/details/134168716", "type":1, "top":false, "forcePlan":false, "viewCount":12687, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134168716", "postTime":"2023-11-01 20:23:20", "diggCount":0, "formatTime":"2023.11.01", "picList":["https://img-blog.csdnimg.cn/4b29abc22a70482ea03a6f9a1fbe4894.jpeg"], "collectCount":1} , { "articleId":134129653, "title":"Docker 運行swagger-editor實現(xiàn)在線接口文檔維護與調(diào)試", "description":"在Swagger Editor中,我們可以基于YAML等語法定義我們的RESTful API,然后它會自動生成一篇排版優(yōu)美的API文檔,并且提供實時預覽。因工作需要,需要搭建python運行環(huán)境,項目中python基于flask實現(xiàn)了swagger在線文檔以及接口測試,前后端對接開發(fā)時需要使用。項目比較龐大,完全部署的話,只使用swagger在線文檔功能的話,太浪費資源了。這么看來swagger-editor可以基于swagger yaml文件實現(xiàn)在線接口文檔生成,完全符合我們的需求。", "url":"https://blog.csdn.net/qq_16127313/article/details/134129653", "type":1, "top":false, "forcePlan":false, "viewCount":12795, "commentCount":2, "editUrl":"https://editor.csdn.net/md?articleId=134129653", "postTime":"2023-10-31 13:00:00", "diggCount":1, "formatTime":"2023.10.31", "picList":["https://img-blog.csdnimg.cn/8dbc787249d74c29a6274e292f867afc.png"], "collectCount":0} , { "articleId":134099991, "title":"SpringBoot工程啟動時自動創(chuàng)建數(shù)據(jù)庫、數(shù)據(jù)表", "description":"DML是數(shù)據(jù)操作語言,主要用來對數(shù)據(jù)庫里的數(shù)據(jù)進行操作,涉及具體數(shù)據(jù),一般保存在data.sql。我們知道,springboot工程配置數(shù)據(jù)源一般采用yaml或properties文件的方式。DDL是數(shù)據(jù)定義語言,主要用來對數(shù)據(jù)庫表結(jié)構(gòu)進行操作,不涉及具體數(shù)據(jù),一般保存在。注意這里配置的druid.username一定要有。之前版本,springboot2.5.0之后版本。這里yaml文件引用了properties文件。, 否則數(shù)據(jù)庫不存在的前提下,會創(chuàng)建失敗。注意以上說明,是針對。", "url":"https://blog.csdn.net/qq_16127313/article/details/134099991", "type":1, "top":false, "forcePlan":false, "viewCount":13353, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134099991", "postTime":"2023-10-29 10:38:52", "diggCount":0, "formatTime":"2023.10.29", "picList":["https://img-blog.csdnimg.cn/a7b7e5475fde4591928da1687b8b67dc.png"], "collectCount":1} , { "articleId":134050713, "title":"【求教】老菜鳥遇到新問題,雙bug歡迎有緣人答疑", "description":"俗話說:但行好事, 莫問前程, 心之所向, 無問西東編程亦然,coding多了,就會遇到各種各樣奇怪的問題,真是讓人歡喜讓人憂?。∵@不,小C最近實現(xiàn)了一個使用mysql數(shù)據(jù)庫來保存日志的功能,不幸的是,遇到兩個難解的問題,現(xiàn)拿出來,希望各位見多識廣的大佬能幫忙分析,小可不勝感激!", "url":"https://blog.csdn.net/qq_16127313/article/details/134050713", "type":1, "top":false, "forcePlan":false, "viewCount":12589, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134050713", "postTime":"2023-10-26 17:25:12", "diggCount":0, "formatTime":"2023.10.26", "picList":["https://img-blog.csdnimg.cn/593bba46a58c4253baa495fad69c1359.jpeg"], "collectCount":0} , { "articleId":134019416, "title":"服務器之日常整活", "description":"言歸正傳,自從不小心踏足程序猿這個職業(yè),便大部分時間與Code為伴,除了日常完成工作任務外,自己也研究過不少新奇的idea,積累了一些代碼。這些代碼大部分需要服務器資源來運行,下面簡單將服務器用法做一些小小總結(jié),給大家參考。等等,什么叫假如你有一臺服務器,假如只有一臺,肯定我想搞第二臺,順便第三臺啊,哈哈哈!", "url":"https://blog.csdn.net/qq_16127313/article/details/134019416", "type":1, "top":false, "forcePlan":false, "viewCount":12665, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134019416", "postTime":"2023-10-24 20:20:45", "diggCount":0, "formatTime":"2023.10.24", "picList":["https://img-blog.csdnimg.cn/a245ebdfeed94a7db79deeacc0a87aed.png"], "collectCount":1} , { "articleId":134010951, "title":"神奇代碼備份恢復工具逸事與操作指南", "description":"軟件行業(yè)流傳著一幅漫畫:開發(fā)軟件就像制造小轎車,不是一開始就有設計圖,也不是將輪子、車身、車門、發(fā)動機按部就班安裝上去就可以的,而是大概先出現(xiàn)獨輪車,接著出現(xiàn)自行車,然后是滑板車,之后是三輪自行車,繼而是兩輪摩托車··……如此反復迭代,最后才得到成型的小轎車。這幅漫畫諷刺的是開發(fā)新系統(tǒng)時“想當然”的做法,反映的是真實的探索過程。其實,不僅開發(fā)系統(tǒng)是這樣,即使是開發(fā)一個小工具,也遵循類似的原則,畢竟大部分軟件被開發(fā)出來,是需要去解決實際中遇到的難題的。n年前,小C曾入職一家軟件公司,公司信息安全管理比較嚴格,", "url":"https://blog.csdn.net/qq_16127313/article/details/134010951", "type":1, "top":false, "forcePlan":false, "viewCount":12646, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=134010951", "postTime":"2023-10-24 14:07:07", "diggCount":0, "formatTime":"2023.10.24", "picList":["https://img-blog.csdnimg.cn/02b296f99e1e431bb8c97d0f50fc074c.png"], "collectCount":0} , { "articleId":133792839, "title":"神奇代碼恢復工具", "description":"小C是一名程序猿,他有好多新奇的點子,也樂于把這些變成文字分享給大家。這些分享大部分都與代碼相關,在文章里面把這些代碼全部按本來的結(jié)構(gòu)展示出來也不是一件容易的事!這不,最近開發(fā)了一個小工具,界面介紹如下:procode-simple-0.0.1.jar在輸入框里面輸入待恢復的代碼,點擊\"開始恢復代碼\" 便生成原來代碼結(jié)構(gòu)的代碼。大家可以下載jar,拷貝附件代碼嘗試運行!代碼恢復數(shù)據(jù)框輸入的內(nèi)容為:", "url":"https://blog.csdn.net/qq_16127313/article/details/133792839", "type":1, "top":false, "forcePlan":false, "viewCount":12661, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=133792839", "postTime":"2023-10-12 17:33:53", "diggCount":0, "formatTime":"2023.10.12", "picList":["https://img-blog.csdnimg.cn/d148a23a7ee243cda4664aa4006beec2.png"], "collectCount":0} , { "articleId":133763881, "title":"巧用h2-database.jar連接數(shù)據(jù)庫", "description":"H2 Database是一個開源的嵌入式數(shù)據(jù)庫引擎,采用java語言編寫,不受平臺的限制,同時H2 Database提供了一個十分方便的web控制臺用于操作和管理數(shù)據(jù)庫內(nèi)容。H2 Database還提供兼容模式,可以兼容一些主流的數(shù)據(jù)庫,因此采用H2 Database作為開發(fā)期的數(shù)據(jù)庫非常方便。", "url":"https://blog.csdn.net/qq_16127313/article/details/133763881", "type":1, "top":false, "forcePlan":false, "viewCount":12663, "commentCount":1, "editUrl":"https://editor.csdn.net/md?articleId=133763881", "postTime":"2023-10-11 17:38:45", "diggCount":0, "formatTime":"2023.10.11", "picList":["https://img-blog.csdnimg.cn/06d4140489c342d0b531bb404e8be09b.png"], "collectCount":0} , { "articleId":133707738, "title":"【Code】4種常用Java線程鎖的特點,性能比較、使用場景", "description":"本文是對相關主題文章的代碼功能展示,主要通過代碼形式來驗證和演示功能,以加深對知識點的理解。如有遺漏或理解不正確的地方,歡迎大家拍磚!", "url":"https://blog.csdn.net/qq_16127313/article/details/133707738", "type":1, "top":false, "forcePlan":false, "viewCount":12605, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=133707738", "postTime":"2023-10-09 17:18:25", "diggCount":0, "formatTime":"2023.10.09", "picList":["https://img-blog.csdnimg.cn/fabe30e269c34069b1c0d64e24923ebf.jpeg"], "collectCount":0} , { "articleId":82924432, "title":"問答雕蟲1", "description":"問題:現(xiàn)在有如下表假設按時間順序,記錄中連續(xù)出現(xiàn)0.2 0.3 0.5 0.7四條記錄記為一次有效數(shù)據(jù)組,統(tǒng)計一段時間范圍內(nèi),有效數(shù)據(jù)組出現(xiàn)的次數(shù),最終計算有效數(shù)據(jù)組在整個時間范圍內(nèi)的記錄的占比。用mysql語句或者函數(shù)如何實現(xiàn)?解答:數(shù)據(jù)庫增加輔助字段 sign, varchar 4位思路分4步走:按時間順序篩選出 0.2 開始的記錄取隨后的3條記錄,依次判斷是否為0.3, 0...", "url":"https://blog.csdn.net/qq_16127313/article/details/82924432", "type":1, "top":false, "forcePlan":false, "viewCount":12648, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=82924432", "postTime":"2023-10-04 09:33:19", "diggCount":0, "formatTime":"2023.10.04", "picList":["https://img-blog.csdnimg.cn/f644a1c8699e4e37a44426afbd21d11b.jpeg"], "collectCount":0} , { "articleId":133519731, "title":"備忘錄:Docker基礎操作與常用命令", "description":"簡而言之,docker-compose適用于開發(fā)和測試。Docker Stack 則適用于大規(guī)模場景和生產(chǎn)環(huán)境。Docker Stack 和 Docker Compose 的一個區(qū)別是Stack 不支持構(gòu)建。這意味著在部署 Stack 之前,所有鏡像必須提前構(gòu)建完成。", "url":"https://blog.csdn.net/qq_16127313/article/details/133519731", "type":1, "top":false, "forcePlan":false, "viewCount":12631, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=133519731", "postTime":"2023-10-03 15:43:01", "diggCount":0, "formatTime":"2023.10.03", "picList":["https://img-blog.csdnimg.cn/45c5a3aa63624714a8b81a4007c52105.png"], "collectCount":0} , { "articleId":133500980, "title":"springmvc項目部署包獨立jar方式運行", "description":"小A向其余2人抱怨說,咱們公司開發(fā)小組維護的那個歷史比較悠久的B項目,在測試服務上部署太麻煩了,每次更新都需要先停Tomcat服務器,再刪掉舊的war和目錄,然后上傳war包,最后再重啟服務。小B說,據(jù)我所知,那個B項目是springmvc框架開發(fā)的,歷史悠久,想把他轉(zhuǎn)換為springboot框架Jar運行,基本上不太可能,除非大動。小A、小B、小C都在一家初創(chuàng)公司工作,小A是系統(tǒng)運維,小B和小C都是后臺開發(fā),他們都是能力卓越的IT工程獅。** 各位大佬,快來幫幫他,提供思路來解決他的難處!", "url":"https://blog.csdn.net/qq_16127313/article/details/133500980", "type":1, "top":false, "forcePlan":false, "viewCount":12823, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=133500980", "postTime":"2023-10-02 22:21:36", "diggCount":4, "formatTime":"2023.10.02", "picList":["https://img-blog.csdnimg.cn/dbc7886b4d574e4ab3464bdf97558868.jpeg"], "collectCount":1} , { "articleId":133382490, "title":"通過java向jar寫入新文件", "description":"test.jar在運行過程中是無法改變自身內(nèi)容的,但是可以創(chuàng)建內(nèi)容與test.jar一致的test2.jar。借助 commons-compress 來操作Jar。使用JDK API實現(xiàn)。", "url":"https://blog.csdn.net/qq_16127313/article/details/133382490", "type":1, "top":false, "forcePlan":false, "viewCount":12903, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=133382490", "postTime":"2023-09-28 14:51:35", "diggCount":1, "formatTime":"2023.09.28", "picList":["https://img-blog.csdnimg.cn/82ff49f1115a4067b7ea252e651034f8.png"], "collectCount":0} , { "articleId":132943342, "title":"SpringBoot工程web模式與非web模式和諧共處運行", "description":"Spring Boot 是 Pivotal 團隊在 Spring 的基礎上提供的一套全新的開源框架,其目的是為了簡化 Spring 應用的搭建和開發(fā)過程。Spring Boot 去除了大量的 XML 配置文件,簡化了復雜的依賴管理。Spring Boot 具有 Spring 一切優(yōu)秀特性,Spring 能做的事,Spring Boot 都可以做,而且使用更加簡單,功能更加豐富,性能更加穩(wěn)定而健壯。隨著近些年來微服務技術的流行,Spring Boot 也成了時下炙手可熱的技術。", "url":"https://blog.csdn.net/qq_16127313/article/details/132943342", "type":1, "top":false, "forcePlan":false, "viewCount":12677, "commentCount":1, "editUrl":"https://editor.csdn.net/md?articleId=132943342", "postTime":"2023-09-17 16:00:23", "diggCount":0, "formatTime":"2023.09.17", "picList":["https://img-blog.csdnimg.cn/8f537f64d64f479391468a3d71bd5ea4.png"], "collectCount":0} , { "articleId":132926518, "title":"SpringMVC工程之非web部分代碼復用,并獨立運行", "description":"springMVC是位于spring web端的一個框架,是一種基于Java的實現(xiàn)了Web MVC設計模式的請求驅(qū)動類型的輕量級Web框架,即使用了MVC架構(gòu)模式的思想,將web層進行職責解耦。下面我們以如何復用此SpringMVC工程的非web部分代碼, 并脫離web環(huán)境使之獨立運行。", "url":"https://blog.csdn.net/qq_16127313/article/details/132926518", "type":1, "top":false, "forcePlan":false, "viewCount":12597, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=132926518", "postTime":"2023-09-16 23:06:39", "diggCount":0, "formatTime":"2023.09.16", "picList":["https://img-blog.csdnimg.cn/6e5d1b4c3c14433784f594e9e2db66d5.png"], "collectCount":0} , { "articleId":132917498, "title":"log4j2 日志保存至數(shù)據(jù)庫", "description":"Apache Log4j 2是對Log4j的升級,它比其前身Log4j 1.x提供了重大改進,并提供了Logback中可用的許多改進,同時修復了Logback架構(gòu)中的一些問題。是目前最優(yōu)秀的Java日志框架,沒有之一。官方Appenders提供了日志的多種輸出方式實現(xiàn)。下面我們以 JDBCAppender 為例來說明如何在項目中實現(xiàn)系統(tǒng)日志保存到數(shù)據(jù)庫。/*** 日志數(shù)據(jù)庫數(shù)據(jù)源* @version [版本號, 2023年3月27日]* @see [相關類/方法]", "url":"https://blog.csdn.net/qq_16127313/article/details/132917498", "type":1, "top":false, "forcePlan":false, "viewCount":12771, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=132917498", "postTime":"2023-09-16 15:02:40", "diggCount":0, "formatTime":"2023.09.16", "picList":["https://img-blog.csdnimg.cn/4844639927bc4c3c80b0b422fcc861e6.png"], "collectCount":2} , { "articleId":132640453, "title":"分布式鎖實現(xiàn)二. memcached分布式鎖", "description":"add和set的區(qū)別在于:如果多線程并發(fā)set,則每個set都會成功,但最后存儲的值以最后的set的線程為準。而add的話則相反,add會添加第一個到達的值,并返回true,后續(xù)的添加則都會返回false。(1)memcached采用列入LRU置換策略,所以如果內(nèi)存不夠,可能導致緩存中的鎖信息丟失。為方便起見,已經(jīng)將memcached服務器端程序上傳到下面的目錄,使用時只需要雙擊運行就好!memcached帶有add函數(shù),利用add函數(shù)的特性即可實現(xiàn)分布式鎖。利用該點即可很輕松地實現(xiàn)分布式鎖。", "url":"https://blog.csdn.net/qq_16127313/article/details/132640453", "type":1, "top":false, "forcePlan":false, "viewCount":12660, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=132640453", "postTime":"2023-09-02 17:40:14", "diggCount":0, "formatTime":"2023.09.02", "picList":["https://img-blog.csdnimg.cn/7461e0a96eba4a3eae502137a7d83770.png"], "collectCount":0} , { "articleId":132612861, "title":"分布式鎖實現(xiàn)一. 利用Mysql數(shù)據(jù)庫update鎖", "description":"分布式鎖,即分布式系統(tǒng)中的鎖。在單體應用中我們通過鎖解決的是控制共享資源訪問的問題,而分布式鎖,就是解決了分布式系統(tǒng)中控制共享資源訪問的問題。與單體應用不同的是,分布式系統(tǒng)中競爭共享資源的最小粒度從線程升級成了進程。", "url":"https://blog.csdn.net/qq_16127313/article/details/132612861", "type":1, "top":false, "forcePlan":false, "viewCount":12648, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=132612861", "postTime":"2023-08-31 22:56:25", "diggCount":0, "formatTime":"2023.08.31", "picList":["https://img-blog.csdnimg.cn/5d3419cf76c64a7492120887a0ba7b09.png"], "collectCount":0} , { "articleId":132523351, "title":"k3s初體驗", "description":"是輕量級的 Kubernetes。K3s 易于安裝,僅需要 Kubernetes 內(nèi)存的一半,所有組件都在一個小于 100 MB 的二進制文件中。K3s 是 rancher 公司開發(fā)維護的一套 K8s 發(fā)行版。目的是輕量化 K8s,并將其應用于 IoT 設備(比如樹莓派)。簡單來說,K3s 就是精簡版 K8s,消耗資源極少。適用于以下場景:1、邊緣計算-Edge2、物聯(lián)網(wǎng)-IoT3、CI:持續(xù)集成4、開發(fā)5、ARM 6、嵌入 K8s。", "url":"https://blog.csdn.net/qq_16127313/article/details/132523351", "type":1, "top":false, "forcePlan":false, "viewCount":12602, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=132523351", "postTime":"2023-08-27 15:08:09", "diggCount":0, "formatTime":"2023.08.27", "picList":["https://img-blog.csdnimg.cn/ebf6df88468340bcb2ddd5d7c0229799.png"], "collectCount":0} , { "articleId":132512424, "title":"容器鏡像生成記", "description":"容器docker/k8s發(fā)布已有一段時間,不少小伙伴開始上手實踐。下面以一個簡單的應用為例。來說明如何生成鏡像并推送至鏡像倉庫。", "url":"https://blog.csdn.net/qq_16127313/article/details/132512424", "type":1, "top":false, "forcePlan":false, "viewCount":12634, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=132512424", "postTime":"2023-08-26 17:00:05", "diggCount":0, "formatTime":"2023.08.26", "picList":["https://img-blog.csdnimg.cn/ae6f00b7ea9e46c4bd2966cf2386717e.png"], "collectCount":0} , { "articleId":130374351, "title":"【原創(chuàng)】yaml轉(zhuǎn)換成JSON、MAP、Properties", "description":"yaml讀取和解析太麻煩,轉(zhuǎn)換成properties文件處理就方便很多!", "url":"https://blog.csdn.net/qq_16127313/article/details/130374351", "type":1, "top":false, "forcePlan":false, "viewCount":12959, "commentCount":2, "editUrl":"https://editor.csdn.net/md?articleId=130374351", "postTime":"2023-04-25 21:28:27", "diggCount":1, "formatTime":"2023.04.25", "picList":["https://img-blog.csdnimg.cn/direct/862003928aea4ad7876425b45496b1ff.png"], "collectCount":2} , { "articleId":128268341, "title":"springboot工程運行時動態(tài)改變logj4j2日志級別", "description":"springboot工程運行時動態(tài)改變logj4j2日志級別。", "url":"https://blog.csdn.net/qq_16127313/article/details/128268341", "type":1, "top":false, "forcePlan":false, "viewCount":12681, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=128268341", "postTime":"2022-12-10 19:57:36", "diggCount":0, "formatTime":"2022.12.10", "picList":["https://img-blog.csdnimg.cn/6ab02b85a94a4a25bcc11f499c8d23f5.png"], "collectCount":1} , { "articleId":128066577, "title":"spring 應用URL探測", "description":"當發(fā)現(xiàn)指定 baseUrl + “:” + port + “/” + path 可以訪問時,自動打開該地址。此代碼無強依賴,springmvc,springboot工程均可用。從配置文件讀取基礎url信息,端口起始信息,訪問路徑列表。", "url":"https://blog.csdn.net/qq_16127313/article/details/128066577", "type":1, "top":false, "forcePlan":false, "viewCount":12638, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=128066577", "postTime":"2022-11-27 17:14:16", "diggCount":0, "formatTime":"2022.11.27", "picList":["https://img-blog.csdnimg.cn/4603b6056a4b4b209efd4d21deb1aaff.png"], "collectCount":0} , { "articleId":127971139, "title":"Docker 服務端口一覽", "description":"最近,研究微服務,使用Docker來進行部署,說實話docker是個好東西,只要編寫號dockfile文件和docker-compose.yml文件,能快速啟動相關服務。咱們變發(fā)揮技術人的優(yōu)勢,能用程序搞定的絕不手動,找了一通,發(fā)現(xiàn)這個命令可以查看應用名稱和端口的對應關系。便想到通過調(diào)用shell腳本的方式來獲取內(nèi)容,傳送到前端頁面進行展示!調(diào)試項目的時候必須輸入一堆的ip和端口來,讓人有點不爽。調(diào)試過程查看服務可以使用。", "url":"https://blog.csdn.net/qq_16127313/article/details/127971139", "type":1, "top":false, "forcePlan":false, "viewCount":12851, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=127971139", "postTime":"2022-11-21 19:58:13", "diggCount":0, "formatTime":"2022.11.21", "picList":["https://img-blog.csdnimg.cn/ff77a19f08c543f6aff3ef0e42aff8ae.png"], "collectCount":2} , { "articleId":124761422, "title":"備忘錄:shell 腳本", "description":"查詢 springboot-hello.war 進程,并自動終止ps -ef|grep springboot-hello.warps -ef | grep java | grep springboot-hello.war | cut -c 9-17ps -ef | grep java | grep springboot-hello.war | cut -c 9-17 | xargs kill -9執(zhí)行結(jié)果:", "url":"https://blog.csdn.net/qq_16127313/article/details/124761422", "type":1, "top":false, "forcePlan":false, "viewCount":12607, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=124761422", "postTime":"2022-05-13 22:50:05", "diggCount":0, "formatTime":"2022.05.13", "picList":["https://img-blog.csdnimg.cn/239d831a7a7145c28b38c8b7009254ba.jpeg"], "collectCount":0} , { "articleId":124140533, "title":"Docker 微服務部署入門到實踐", "description":"文章目錄前言一、docker安裝二、創(chuàng)建微服務項目三、運行前準備1. 服務器安裝maven2.上傳源碼到服務器3. 編譯源碼并打包鏡像四、Docker-compose運行微服務五、Docker swarm運行微服務總結(jié)前言本文重點關注docker相關實踐,不再詳細闡述理論知識一、docker安裝下面的闡述以centos7系統(tǒng)為例說明,為什么是centos7,原因是centos8官方已經(jīng)不維護了yum源已經(jīng)失效,安裝組件不方便#2個yum源選用#官方y(tǒng)um源,適合國外主機sudo yum-co", "url":"https://blog.csdn.net/qq_16127313/article/details/124140533", "type":1, "top":false, "forcePlan":false, "viewCount":12835, "commentCount":2, "editUrl":"https://editor.csdn.net/md?articleId=124140533", "postTime":"2022-04-13 14:50:53", "diggCount":1, "formatTime":"2022.04.13", "picList":["https://img-blog.csdnimg.cn/4606fe48b5b84db8adcb0c2af9da07a4.png"], "collectCount":6} , { "articleId":123818392, "title":"SonarQube配置前端工程代碼檢測", "description":"sonarqube:7.8-community 是 sonar 對 jdk1.8 的最后一個版本,從 7.9 以后 sonar 最低支持版本為 jdk 1.11,為了兼顧java項目,我們這邊安裝此版本。首先,編寫docker-compose.yml文件version: '3.8'services: sonarqube: image: sonarqube:7.8-community container_name: sonarqube deploy: resources:", "url":"https://blog.csdn.net/qq_16127313/article/details/123818392", "type":1, "top":false, "forcePlan":false, "viewCount":12773, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=123818392", "postTime":"2022-03-29 12:43:17", "diggCount":0, "formatTime":"2022.03.29", "picList":["https://img-blog.csdnimg.cn/b7be8058998b4fdbae9dd2bf32a2414e.png"], "collectCount":1} , { "articleId":123673585, "title":"docker 容器修改后保存轉(zhuǎn)移", "description":"nginx:alpine 鏡像運行為容器后,本人做了域名、ssl等配置,如何保存并轉(zhuǎn)移到別的服務器使用!容器名:nginx 容器 id:df04beccb7921.容器保存為鏡像docker commit df04beccb792 my-nginxdocker commit nginx my-nginx2.鏡像保存為tardocker save my-nginx > nginx.tardocker save my-nginx:latest > nginx.tar3.tar恢復為鏡", "url":"https://blog.csdn.net/qq_16127313/article/details/123673585", "type":1, "top":false, "forcePlan":false, "viewCount":12812, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=123673585", "postTime":"2022-03-22 22:29:34", "diggCount":1, "formatTime":"2022.03.22", "picList":["https://img-blog.csdnimg.cn/9cdcba3cea7d404490931a3a3ee6580c.png"], "collectCount":2} , { "articleId":123440340, "title":"程序猿Git項目代碼自動提交神器", "description":"文章目錄前言使用步驟1.下載jar 或源碼編譯打包2.啟動jar3. 設置git提交參數(shù)4. 測試提交功能總結(jié)主要涉及技術點待優(yōu)化功能前言這年頭,程序猿沒事誰不會整幾個假的開源項目,假裝勤奮呢!但是,一看提交記錄和貢獻次數(shù),會相當尷尬。。。自己的別人的怎么辦呢?咱們只能劍走偏鋒,用戰(zhàn)術上的勤奮掩蓋戰(zhàn)略上的懶惰,能寫代碼自動執(zhí)行絕不手動,誰讓咱是程序猿呢!本著懶人精神開發(fā)了此工具,分享出來給大家!使用步驟1.下載jar 或源碼編譯打包標準springboot工程 Jar下載地址源碼傳", "url":"https://blog.csdn.net/qq_16127313/article/details/123440340", "type":1, "top":false, "forcePlan":false, "viewCount":16233, "commentCount":2, "editUrl":"https://editor.csdn.net/md?articleId=123440340", "postTime":"2022-03-12 12:08:55", "diggCount":2, "formatTime":"2022.03.12", "picList":["https://img-blog.csdnimg.cn/28a1424cc9184cff897804f516b1eae1.png"], "collectCount":2} , { "articleId":122268919, "title":"docker容器應用的水平拓展和負載均衡", "description":"docker 的水平拓展和負載均衡docker 在開發(fā)人員日常開發(fā)中已經(jīng)得到普遍使用,下面我們以nignx+tomcat為例來進行說明,如何在不同的系統(tǒng)環(huán)境中來快速將單節(jié)點應用做水平拓展", "url":"https://blog.csdn.net/qq_16127313/article/details/122268919", "type":1, "top":false, "forcePlan":false, "viewCount":12989, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=122268919", "postTime":"2022-01-01 23:13:00", "diggCount":0, "formatTime":"2022.01.01", "picList":["https://img-blog.csdnimg.cn/7aecba3b4ddc4d128f1397411091f7f5.png"], "collectCount":1} , { "articleId":121866379, "title":"Apache Log4j2 遠程代碼執(zhí)行漏洞處理", "description":"漏洞詳情Apache Log4j2是Apache的一個開源項目,它允許開發(fā)者以任意間隔輸出日志信息;可以控制日志信息輸送的目的地是控制臺、文件、GUI組件,甚至是套接口服務器、NT的事件記錄器、UNIX Syslog守護進程等。該漏洞是由于Apache Log4j2某些功能存在遞歸解析功能,攻擊者可直接構(gòu)造惡意請求,觸發(fā)遠程代碼執(zhí)行漏洞。漏洞利用無需特殊配置Apache Struts2、Apache Solr、Apache Druid、Apache Flink等均受影響。風險等級嚴重影響范圍Lo", "url":"https://blog.csdn.net/qq_16127313/article/details/121866379", "type":1, "top":false, "forcePlan":false, "viewCount":12653, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=121866379", "postTime":"2021-12-10 22:46:31", "diggCount":1, "formatTime":"2021.12.10", "picList":["https://img-blog.csdnimg.cn/f04aa7ad7320437fb16dd80c342beff1.jpeg"], "collectCount":0} , { "articleId":118279009, "title":"如何保護你的云主機", "description":"自從買了某x云主機,每隔一段時間,就有通知發(fā)過來,說疑似受到木馬攻擊。 ssh連不上或者能連上,但是服務器cpu占用嚇人,沒法子只能重裝系統(tǒng)。雖然可以做鏡像來回滾系統(tǒng)。但鏡像有容量限制,也不是長久之計啊。。。靈機一動,我們新開的主機一般都是root賬號22端口,默認情況下很少有人去禁用。這樣我們就有2種做法:禁用默認端口22vi /etc/ssh/sshd_config#找到Port 22處修改新端口#重啟ssh服務systemctl restart sshd禁用root用戶遠程登錄", "url":"https://blog.csdn.net/qq_16127313/article/details/118279009", "type":1, "top":false, "forcePlan":false, "viewCount":12618, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=118279009", "postTime":"2021-06-27 20:25:33", "diggCount":1, "formatTime":"2021.06.27", "picList":["https://img-blog.csdnimg.cn/ec06783cc1ec4a158f2fd4bb34d01c8a.png"], "collectCount":0} , { "articleId":110558232, "title":"樹莓派4B之奇怪技能", "description":"樹莓派官方操作系統(tǒng)Raspberry Pi,最好用的遠程桌面工具是Remmina,它支持RDP,VNC,SPICE ,NX,XDMCP,SSH和EXEC。要安裝Remmina,請返回到終端并輸入:sudo apt install remmina安裝完成后,可以從Internet菜單中啟動這邊輸入windows機器的ip地址輸入用戶名、密碼后便可以連接到windows遠程桌面。...", "url":"https://blog.csdn.net/qq_16127313/article/details/110558232", "type":1, "top":false, "forcePlan":false, "viewCount":12671, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110558232", "postTime":"2020-12-04 13:09:32", "diggCount":0, "formatTime":"2020.12.04", "picList":["https://img-blog.csdnimg.cn/b054673d020a44ae939404f915d5c0c1.jpeg"], "collectCount":0} , { "articleId":110632694, "title":"樹莓派系統(tǒng)備忘錄", "description":"樹莓派4b截圖截圖工具 scrot , 快捷鍵 Ctrl + Alt + Tsudo apt-get install scrot截全屏(或者按PrtScr鍵)scrot區(qū)域截圖scrot -s延時5秒截圖scrot -d 5", "url":"https://blog.csdn.net/qq_16127313/article/details/110632694", "type":1, "top":false, "forcePlan":false, "viewCount":12594, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110632694", "postTime":"2020-12-04 12:12:11", "diggCount":0, "formatTime":"2020.12.04", "picList":["https://img-blog.csdnimg.cn/0b7dc748d90445c291952fe926e07130.jpeg"], "collectCount":1} , { "articleId":110451928, "title":"Docker 單個容器運行多個war、jar", "description":"方法一:DockerfileRUN echo -e \\\"#!/bin/sh\\n\"\\\"nohup java -jar /app.war --server.port=8085 &\\n\"\\\"nohup java -jar /app.war --server.port=8086 &\"\\>> /usr/bin/start.shRUN chmod +x /usr/bin/start.shCMD nohup sh -c \"start.sh\"方法二Dockerfi.", "url":"https://blog.csdn.net/qq_16127313/article/details/110451928", "type":1, "top":false, "forcePlan":false, "viewCount":12946, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110451928", "postTime":"2020-12-01 20:59:16", "diggCount":4, "formatTime":"2020.12.01", "picList":["https://img-blog.csdnimg.cn/a1da82359f604a03aa6a40af4ebabb0a.png"], "collectCount":16} , { "articleId":110366543, "title":"Jenkins持續(xù)集成之實踐總結(jié)", "description":"jenkins 系列文章,包含效果演示(2021-01-25 10:10:25 效果演示到期,輕量應用服務器只申請了試用2個月時間)以及實現(xiàn)說明已經(jīng)初步完成:jenkins實現(xiàn) windows server 2012環(huán)境下自動部署warjenkins實現(xiàn)Centos 7 下自動部署warjenkins 實現(xiàn)gitbook項目(電子書)的自動發(fā)布jenkins 實現(xiàn)源碼到docker鏡像的自動部署運行下面結(jié)合自己的實踐,提供一些建議和技巧:...", "url":"https://blog.csdn.net/qq_16127313/article/details/110366543", "type":1, "top":false, "forcePlan":false, "viewCount":12597, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110366543", "postTime":"2020-11-30 08:57:33", "diggCount":0, "formatTime":"2020.11.30", "picList":["https://img-blog.csdnimg.cn/c6549016cfb74987a3761d3fc52fe763.jpeg"], "collectCount":0} , { "articleId":110287461, "title":"jenkins 實現(xiàn)源碼到docker鏡像的自動部署運行", "description":"看過這3篇文章:jenkins實現(xiàn) windows server 2012環(huán)境下自動部署warjenkins實現(xiàn)Centos 7 下自動部署warjenkins 實現(xiàn)gitbook項目(電子書)的自動發(fā)布大家應該對java工程jenkins里的打包流程非常熟悉了!現(xiàn)在來動手實現(xiàn)Centos7 系統(tǒng)下源碼到docker鏡像的自動部署運行,其實問題已經(jīng)簡化成:jenkins調(diào)用遠程網(wǎng)站服務器腳本實現(xiàn)docker鏡像的重新生成jenkins調(diào)用遠程網(wǎng)站服務器腳本實現(xiàn)docker鏡像的重新啟動問", "url":"https://blog.csdn.net/qq_16127313/article/details/110287461", "type":1, "top":false, "forcePlan":false, "viewCount":12665, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110287461", "postTime":"2020-11-28 17:41:37", "diggCount":0, "formatTime":"2020.11.28", "picList":["https://img-blog.csdnimg.cn/530a2f180fc54ad3a669c17fe335d15a.jpeg"], "collectCount":2} , { "articleId":110246396, "title":"jenkins 實現(xiàn)gitbook項目(電子書)的自動發(fā)布", "description":"接上一篇 jenkins實現(xiàn)Centos 7 下自動部署war現(xiàn)在來動手實現(xiàn)Centos7 系統(tǒng)下gitbook項目的自動發(fā)布。老規(guī)矩,先看效果,再來談實現(xiàn)!控制臺地址1: https://jks.00fly.online/job/gitbook-docker/控制臺地址2: https://jks.00fly.online/job/gitbook-nginx/項目源碼: https://gitee.com/00fly/gitbook項目地址: https://book.001fly.to", "url":"https://blog.csdn.net/qq_16127313/article/details/110246396", "type":1, "top":false, "forcePlan":false, "viewCount":12760, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110246396", "postTime":"2020-11-27 21:03:40", "diggCount":0, "formatTime":"2020.11.27", "picList":["https://img-blog.csdnimg.cn/f69b8c3f7bf6422a9c43a9fc4d12d3d0.jpeg"], "collectCount":1} , { "articleId":110202131, "title":"jenkins實現(xiàn)Centos 7 下自動部署war", "description":"接上一篇 jenkins實現(xiàn) windows server 2012環(huán)境下自動部署war這次采取先看后詳細說明的方式!首先,我們來看一下效果jenkins 控制臺地址: https://jks.00fly.online/job/demo/項目源碼: https://gitee.com/00fly/demo項目地址 : https://test.001fly.top/user/單擊左邊最上方的#1496,選擇控制臺輸出下拉到最后,會看到打包發(fā)布成功。下面到發(fā)布的網(wǎng)站驗證,注意看最下面", "url":"https://blog.csdn.net/qq_16127313/article/details/110202131", "type":1, "top":false, "forcePlan":false, "viewCount":12769, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=110202131", "postTime":"2020-11-26 20:09:39", "diggCount":0, "formatTime":"2020.11.26", "picList":["https://img-blog.csdnimg.cn/da7efb68046f48929d68d477cbfc8a57.jpeg"], "collectCount":3} , { "articleId":103747502, "title":"代碼備忘錄", "description":"public static void main(String[] args) { List<String> list = new ArrayList<String>(); while (RandomUtils.nextInt() > 9999999) { list.add(Ran...", "url":"https://blog.csdn.net/qq_16127313/article/details/103747502", "type":1, "top":false, "forcePlan":false, "viewCount":12618, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=103747502", "postTime":"2019-12-28 19:02:26", "diggCount":0, "formatTime":"2019.12.28", "picList":["https://img-blog.csdnimg.cn/d832cf966b414385b3a38f478f469a8b.jpeg"], "collectCount":0} , { "articleId":101111358, "title":"云主機一鍵測試網(wǎng)速", "description":"wget https://raw.githubusercontent.com/oooldking/script/master/superspeed.shchmod +x superspeed.sh./superspeed.sh", "url":"https://blog.csdn.net/qq_16127313/article/details/101111358", "type":1, "top":false, "forcePlan":false, "viewCount":12759, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=101111358", "postTime":"2019-09-21 17:08:13", "diggCount":0, "formatTime":"2019.09.21", "picList":["https://img-blog.csdnimg.cn/fd8dd42427f24274836a2585c95a9166.jpeg"], "collectCount":1} , { "articleId":97410157, "title":"jenkins實現(xiàn) windows server 2012環(huán)境下自動部署war", "description":"最近琢磨jenkins,實現(xiàn)了window server環(huán)境下的springboot工程的自動部署、停止與重啟,現(xiàn)詳細記錄如下。服務器配置如下,使用的騰訊云15天免費體驗服務器,安裝軟件為jenkins 、nginx、jdk。具體端口配置為jenkins 8080端口nginx 80端口,同時綁定域名 https://test.00fly.online應用服務器1:8081端口應用服務...", "url":"https://blog.csdn.net/qq_16127313/article/details/97410157", "type":1, "top":false, "forcePlan":false, "viewCount":12731, "commentCount":1, "editUrl":"https://editor.csdn.net/md?articleId=97410157", "postTime":"2019-07-26 20:08:13", "diggCount":0, "formatTime":"2019.07.26", "picList":["https://img-blog.csdnimg.cn/e22dba18fb184a30b380a1ce52044191.jpeg"], "collectCount":1} , { "articleId":96505440, "title":"CAS 源碼打包以及安裝、運行", "description":"下載Cas支持Gradle和Maven兩種方式部署,使用SpringBoot構(gòu)建下載Maven地址:https://github.com/apereo/cas-overlay-templateGradle地址:https://github.com/apereo/cas-gradle-overlay-template構(gòu)建構(gòu)建切換版本 輸入 mvn clean package...", "url":"https://blog.csdn.net/qq_16127313/article/details/96505440", "type":1, "top":false, "forcePlan":false, "viewCount":12718, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=96505440", "postTime":"2019-07-19 22:04:53", "diggCount":0, "formatTime":"2019.07.19", "picList":[], "collectCount":1} , { "articleId":94648576, "title":"如何使用FreeSSL申請免費證書?", "description":"https://blog.freessl.cn/how-to-use-freessl-issue-free-certificates/nginx ssl 配置文件https://ssl-config.mozilla.org/", "url":"https://blog.csdn.net/qq_16127313/article/details/94648576", "type":1, "top":false, "forcePlan":false, "viewCount":12745, "commentCount":0, "editUrl":"https://mp.csdn.net/console/editor/html/94648576", "postTime":"2019-07-04 19:54:02", "diggCount":0, "formatTime":"2019.07.04", "picList":[], "collectCount":1} , { "articleId":86537978, "title":"云服務器配置小記", "description":" 心血來潮,在[阿里云](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=xxhrr2kf)買了個域名,順便搞了臺服務器自己玩! 以下記錄按時間順序記錄在域名申請和服務器配置方面遇到的問題。 2019-01-15 注冊了00fly.online域名的10年使用權(quán)。 2019-01-16 購買...", "url":"https://blog.csdn.net/qq_16127313/article/details/86537978", "type":1, "top":false, "forcePlan":false, "viewCount":12630, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=86537978", "postTime":"2019-01-18 13:46:08", "diggCount":1, "formatTime":"2019.01.18", "picList":[], "collectCount":1} , { "articleId":86181092, "title":"SSL HTTPS證書 Tomcat、SpringBoot、Nginx配置實錄", "description":"&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;&amp;amp;amp;amp;nbsp;隨著安全意識的提升,越來越多的網(wǎng)站使用HTTPS來部署我們的應用系統(tǒng)。專業(yè)的更高安全級別的證書需要花錢購買,我們這里采用阿里 ssl免費證書來演示。具體做法為:注冊阿里云賬號,登錄進去之后,選擇產(chǎn)品-》安全-》數(shù)據(jù)安全-》SSL證書點擊立即購買按鈕,選擇如", "url":"https://blog.csdn.net/qq_16127313/article/details/86181092", "type":1, "top":false, "forcePlan":false, "viewCount":12626, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=86181092", "postTime":"2019-01-09 22:42:41", "diggCount":0, "formatTime":"2019.01.09", "picList":["https://img-blog.csdnimg.cn/20190109214413607.png"], "collectCount":0} , { "articleId":85013639, "title":"阿里巴巴Java開發(fā)手冊.pdf", "description":"https://github.com/alibaba/p3c/blob/master/阿里巴巴Java開發(fā)手冊(詳盡版).pdf", "url":"https://blog.csdn.net/qq_16127313/article/details/85013639", "type":1, "top":false, "forcePlan":false, "viewCount":12891, "commentCount":3, "editUrl":"https://editor.csdn.net/md?articleId=85013639", "postTime":"2018-12-15 13:44:08", "diggCount":0, "formatTime":"2018.12.15", "picList":["https://img-blog.csdnimg.cn/294691a6b11b4439925c04c3879a5159.jpeg"], "collectCount":8} , { "articleId":84947751, "title":"AOP模擬第三方接口調(diào)用返回", "description":"系統(tǒng)開發(fā)時,與第三方系統(tǒng)對接時常見的需求,當我們興沖沖按照接口文檔開發(fā)好代碼的時候,第三方系統(tǒng)卻未準備好,而我們編寫的業(yè)務代碼散落與業(yè)務模塊的各個地方。為了不影響我們系統(tǒng)的運行,必須暫時屏蔽這部分代碼調(diào)用。怎么辦?方法一: 注釋掉這些代碼不就行了嗎,確實,大部分情況下我們可能就是這樣做的。方法二: 配置開關項,接口未準備好的時候設為0或false,啟用時設置為1或true,這好像是我...", "url":"https://blog.csdn.net/qq_16127313/article/details/84947751", "type":1, "top":false, "forcePlan":false, "viewCount":12708, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=84947751", "postTime":"2018-12-10 22:53:19", "diggCount":0, "formatTime":"2018.12.10", "picList":["https://img-blog.csdnimg.cn/6c316030547140c7af39186a04fcc138.jpeg"], "collectCount":2} , { "articleId":84936770, "title":"NamedParameterJdbcTemplate傳參的n種寫法", "description":"沒啥技術含量,爛筆頭記下來備查!數(shù)據(jù)庫 /** * NamedParameterJdbcTemplate * * @see [類、類#方法、類#成員] */ @Test public void testNamedTemplate() { String sql; List&lt;Map&lt...", "url":"https://blog.csdn.net/qq_16127313/article/details/84936770", "type":1, "top":false, "forcePlan":false, "viewCount":12878, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=84936770", "postTime":"2018-12-10 11:16:34", "diggCount":0, "formatTime":"2018.12.10", "picList":["https://img-blog.csdnimg.cn/b2200315bddb4cf59eece121d919913e.jpeg"], "collectCount":10} , { "articleId":84880339, "title":"java代碼格式之一統(tǒng)", "description":"作為有嚴重代碼潔癖的碼農(nóng),決不能容忍代碼中出現(xiàn)不一樣的風格代碼。怎么來強制統(tǒng)一代碼格式呢?我們知道eclipse我們選中工程或源碼目錄右鍵source-》format 或者在代碼中ctrl+shift+f可以格式化代碼,但那是按默認的配置給我們格式化的,未必符合我們的要求。幸好我們可以把格式化規(guī)范以xml文件的方式導入導出,下面我給出一個我使用的格式化模板Eclipse_CodeFormatt...", "url":"https://blog.csdn.net/qq_16127313/article/details/84880339", "type":1, "top":false, "forcePlan":false, "viewCount":12669, "commentCount":1, "editUrl":"https://editor.csdn.net/md?articleId=84880339", "postTime":"2018-12-07 17:50:31", "diggCount":2, "formatTime":"2018.12.07", "picList":[], "collectCount":0} , { "articleId":84786346, "title":"spring mvc 代碼測試那些事兒", "description":"spring、springmvc 是java開發(fā)中的萬能膠水粘合劑,不像之前普通java工程,寫完代碼要測試。簡單,來個main 方法加 System.out.println 。于是乎,spring項目的單元測試就沒人重視了,基本上測試功能都需要部署或tomcat或jetty。。。有沒方法來方便我們進行測試呢, 答案是肯定的。下面我們假設N種場景,來指出怎么快速接入測試。開發(fā)環(huán)境,我們...", "url":"https://blog.csdn.net/qq_16127313/article/details/84786346", "type":1, "top":false, "forcePlan":false, "viewCount":12609, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=84786346", "postTime":"2018-12-04 13:03:01", "diggCount":0, "formatTime":"2018.12.04", "picList":[], "collectCount":0} , { "articleId":84335618, "title":"Spring RestTemplate 調(diào)用https", "description":"Spring RestTemplate 調(diào)用REST API 給我們的開發(fā)工作帶來了極大的方便,默認的SimpleClientHttpRequestFactory 并不支持https的調(diào)用,我們可以通過引入Apache HttpClient實現(xiàn)對https的調(diào)用支持。第一步,注冊package com.fly.config;import org.apache.http...", "url":"https://blog.csdn.net/qq_16127313/article/details/84335618", "type":1, "top":false, "forcePlan":false, "viewCount":13526, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=84335618", "postTime":"2018-11-22 10:59:27", "diggCount":3, "formatTime":"2018.11.22", "picList":["https://img-blog.csdnimg.cn/img_convert/1f20816e15694cf3b56262c1f87e2a14.png"], "collectCount":12} , { "articleId":84196206, "title":"OsCache緩存監(jiān)控刷新工具", "description":" OSCache是一套用Java編寫的緩存框架(或者說解決方案),它主要用于頁面緩存,Servlet緩存,或者其它任意的對象, 且支持集群。 但是居然沒有OsCache的監(jiān)控工具,所以只能用反射機制暴力破解了!OsCacheUtil.javapackage com.fly.core;import java.lang.reflect.Field;import java.util.H...", "url":"https://blog.csdn.net/qq_16127313/article/details/84196206", "type":1, "top":false, "forcePlan":false, "viewCount":12652, "commentCount":1, "editUrl":"https://editor.csdn.net/md?articleId=84196206", "postTime":"2018-11-18 10:09:00", "diggCount":0, "formatTime":"2018.11.18", "picList":[], "collectCount":0} , { "articleId":84105620, "title":"Reflect 機制獲取Class 的屬性和方法信息", "description":"反射機制獲取類的屬性和方法信息import java.lang.reflect.Field;import java.lang.reflect.Method;import java.lang.reflect.Modifier;import org.junit.jupiter.api.Test;public class Reflect{ /** * 獲取屬性信息 ...", "url":"https://blog.csdn.net/qq_16127313/article/details/84105620", "type":1, "top":false, "forcePlan":false, "viewCount":12641, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=84105620", "postTime":"2018-11-15 15:52:49", "diggCount":0, "formatTime":"2018.11.15", "picList":[], "collectCount":0} , { "articleId":83928760, "title":"利用spring改造傳統(tǒng)jdbc使其支持命名參數(shù)形式的SQL", "description":"傳統(tǒng)JDBC SQL調(diào)用形式一般為 update customer set customerName=?, email=? where id=? insert into customer (customerName, email ) values(?, ?)這種由于?與參數(shù)關系的不直觀,帶來的修改bug以及維護麻煩折磨著后續(xù)程序猿。那么,有沒有可能通過對代碼的改造,實現(xiàn)類似于命名參...", "url":"https://blog.csdn.net/qq_16127313/article/details/83928760", "type":1, "top":false, "forcePlan":false, "viewCount":12674, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=83928760", "postTime":"2018-11-10 13:35:59", "diggCount":0, "formatTime":"2018.11.10", "picList":["https://img-blog.csdnimg.cn/bca87b4e845c4524bebdd60d6da4116f.jpeg"], "collectCount":0} , { "articleId":83859307, "title":"JAVA工程啟動時自動創(chuàng)建數(shù)據(jù)庫、數(shù)據(jù)表", "description":"很多時候,我們會有這樣的需求: 1. 系統(tǒng)首次部署時,自動創(chuàng)建數(shù)據(jù)庫、表2. 執(zhí)行單元測試時,數(shù)據(jù)庫、表維持初始化狀態(tài)方便測試。", "url":"https://blog.csdn.net/qq_16127313/article/details/83859307", "type":1, "top":false, "forcePlan":false, "viewCount":13299, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=83859307", "postTime":"2018-11-08 12:38:10", "diggCount":3, "formatTime":"2018.11.08", "picList":["https://img-blog.csdnimg.cn/b1d538c2792942efa65da6932fb889e0.jpeg"], "collectCount":17} , { "articleId":83789396, "title":"SpringMVC工程Controller、Service單元測試代碼", "description":"applicationContext.xml 為spring配置文件spring-mvc.xml 為springmvc配置文件junit4 單元測試代碼import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;import static org.springframework....", "url":"https://blog.csdn.net/qq_16127313/article/details/83789396", "type":1, "top":false, "forcePlan":false, "viewCount":12680, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=83789396", "postTime":"2018-11-06 16:23:35", "diggCount":0, "formatTime":"2018.11.06", "picList":[], "collectCount":1} , { "articleId":83006524, "title":"Spring Web工程最快轉(zhuǎn)Spring Boot工程方法", "description":"刪除web.xml導入springboot pom.xml添加springboot 啟動代碼(舉例)import java.io.IOException;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.springframework.boot.CommandLineRunner;import ...", "url":"https://blog.csdn.net/qq_16127313/article/details/83006524", "type":1, "top":false, "forcePlan":false, "viewCount":12847, "commentCount":0, "editUrl":"https://editor.csdn.net/md?articleId=83006524", "postTime":"2018-10-11 09:04:50", "diggCount":0, "formatTime":"2018.10.11", "picList":["https://img-blog.csdnimg.cn/1d252022aa0e467ba761039c715d6c50.png"], "collectCount":2} , { "articleId":82920560, "title":"普通Java工程 jar 包內(nèi)文件的遍歷以及文件的拷貝", "description":"【代碼】普通Java工程 jar 包內(nèi)文件的遍歷以及文件的拷貝。", "url":"https://blog.csdn.net/qq_16127313/article/details/82920560", "type":1, "top":false, "forcePlan":false, "viewCount":12737, "commentCount":0, "editUrl":"https://mp.csdn.net/console/editor/html/82920560", "postTime":"2017-05-05 22:04:00", "diggCount":0, "formatTime":"2017.05.05", "picList":["https://img-blog.csdnimg.cn/img_convert/1f20816e15694cf3b56262c1f87e2a14.png"], "collectCount":2} , { "articleId":82920550, "title":"利用Apache PropertiesConfiguration實現(xiàn)spring 定時任務配置的及時刷新", "description":"import java.util.Date;import o...", "url":"https://blog.csdn.net/qq_16127313/article/details/82920550", "type":1, "top":false, "forcePlan":false, "viewCount":12695, "commentCount":0, "editUrl":"https://mp.csdn.net/console/editor/html/82920550", "postTime":"2017-05-05 21:44:00", "diggCount":0, "formatTime":"2017.05.05", "picList":["https://img-blog.csdnimg.cn/img_convert/1f20816e15694cf3b56262c1f87e2a14.png"], "collectCount":1} , { "articleId":82920553, "title":"Springmvc工程main方法中運行spring 管理的類方法", "description":"import org.apache.commons.lang3.R...", "url":"https://blog.csdn.net/qq_16127313/article/details/82920553", "type":1, "top":false, "forcePlan":false, "viewCount":12673, "commentCount":0, "editUrl":"https://mp.csdn.net/console/editor/html/82920553", "postTime":"2017-05-05 21:06:00", "diggCount":0, "formatTime":"2017.05.05", "picList":["https://img-blog.csdnimg.cn/img_convert/1f20816e15694cf3b56262c1f87e2a14.png"], "collectCount":1} ], "total":76} }
3. 運行結(jié)果
2024-01-16 12:25:07.597 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135576948
2024-01-16 12:25:07.599 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135506426
2024-01-16 12:25:07.599 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135481476
2024-01-16 12:25:07.599 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135469157
2024-01-16 12:25:07.599 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135418954
2024-01-16 12:25:07.599 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135244727
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135173565
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135167613
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135135799
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/135087188
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134502740
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134482704
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134352661
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134278293
2024-01-16 12:25:07.600 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134199137
2024-01-16 12:25:07.601 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134168716
2024-01-16 12:25:07.601 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134129653
2024-01-16 12:25:07.601 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134099991
2024-01-16 12:25:07.601 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134050713
2024-01-16 12:25:07.601 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134019416
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/134010951
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/133792839
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/133763881
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/133707738
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/82924432
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/133519731
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/133500980
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/133382490
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132943342
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132926518
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132917498
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132640453
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132612861
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132523351
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/132512424
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/130374351
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/128268341
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/128066577
2024-01-16 12:25:07.602 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/127971139
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/124761422
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/124140533
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/123818392
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/123673585
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/123440340
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/122268919
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/121866379
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/118279009
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110558232
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110632694
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110451928
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110366543
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110287461
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110246396
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/110202131
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/103747502
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/101111358
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/97410157
2024-01-16 12:25:07.603 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/96505440
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/94648576
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/86537978
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/86181092
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/85013639
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84947751
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84936770
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84880339
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84786346
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84335618
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84196206
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/84105620
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/83928760
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/83859307
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/83789396
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/83006524
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/82920560
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/82920550
2024-01-16 12:25:07.604 INFO 15060 --- [main] c.f.h.FluxWebClient : https://blog.csdn.net/qq_16127313/article/details/82920553
以上就是java實現(xiàn)解析json復雜數(shù)據(jù)的方法詳解的詳細內(nèi)容,更多關于java解析json復雜數(shù)據(jù)的資料請關注腳本之家其它相關文章!
相關文章
SpringBoot優(yōu)雅地實現(xiàn)全局異常處理的方法詳解
這篇文章主要為大家詳細介紹了SpringBoot如何優(yōu)雅地實現(xiàn)全局異常處理,文中的示例代碼講解詳細,感興趣的小伙伴可以跟隨小編一起學習一下2022-08-08SpringBoot利用EasyExcel實現(xiàn)導出數(shù)據(jù)
EasyExcel是一個基于Java的、快速、簡潔、解決大文件內(nèi)存溢出的Excel處理工具,它能讓你在不用考慮性能、內(nèi)存的等因素的情況下,快速完成Excel的讀、寫等功能看,本文就將介紹如何利用EasyExcel實現(xiàn)導出數(shù)據(jù),需要的朋友可以參考下2023-07-07springboot使用定時器@Scheduled不管用的解決
這篇文章主要介紹了springboot使用定時器@Scheduled不管用的解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2021-12-12Spring大白話之三級緩存如何解決循環(huán)依賴問題
Spring通過三級緩存(singletonObjects、earlySingletonObjects、singletonFactories)解決單例循環(huán)依賴,三級緩存使用Lambda表達式提前暴露bean的早期引用,確保在遞歸調(diào)用時能夠正確獲取對象實例,避免死循環(huán)2025-02-02SpringBoot項目如何把接口參數(shù)中的空白值替換為null值(推薦)
這篇文章主要介紹了SpringBoot項目如何把接口參數(shù)中的空白值替換為null值(推薦),本文給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2021-01-01