MONI后臺管理系統-swagger3(springdoc-openapi)集成

springdoc-openapi Java 庫有助于使用 Spring Boot 項目自動生成 API 文檔。springdoc-openapi 通過在運行時檢查應用程序來根據 Spring 配置、類結構和各種注釋推斷 API 語義。
該庫會自動生成 JSON/YAML 和 HTML 格式的頁面文檔。生成的文檔可以使用swagger-api注釋進行補充。
github地址 官網

1. 項目依賴版本

  • Spring-Boot: 3.1.0

2. 引入依賴

        <dependency><groupId>org.springdoc</groupId><artifactId>springdoc-openapi-starter-webmvc-ui</artifactId><version>2.3.0</version></dependency>

3. 配置

package com.omni.admin.swagger;import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import jakarta.annotation.Resource;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;/*** SpringDoc配置**/
@Configuration
@ConditionalOnExpression("${springdoc.api-docs.enabled:true}")
public class SwaggerDocConfig {@Resourceprivate SwaggerDocProperties springDocProperties;@Beanpublic OpenAPI openAPI() {return new OpenAPI().info(new Info().title(springDocProperties.getTitle()).version(springDocProperties.getApplicationVersion())).addSecurityItem(new SecurityRequirement().addList(springDocProperties.getTokenName())).components(new Components().addSecuritySchemes(springDocProperties.getTokenName(),getSecurityScheme()));}private SecurityScheme getSecurityScheme(){return new SecurityScheme().name(springDocProperties.getTokenName()).in(SecurityScheme.In.HEADER).type(SecurityScheme.Type.APIKEY).scheme("basic");}
}
package com.omni.admin.swagger;import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;import java.util.List;/*** swagger配置類**/
@Data
@Configuration
@ConfigurationProperties(prefix = "springdoc")
@ConditionalOnExpression("${springdoc.api-docs.enabled:true}")
public class SwaggerDocProperties {/*** 項目應用名*/@Value("${spring.application.name:接口文檔}")private String applicationName;/*** 項目名稱*/private String title = "Omni-Admin后臺管理系統接口文檔";/*** 項目版本信息*/private String applicationVersion = "1.0.0";/*** 項目描述信息*/private String applicationDescription;/*** 認證token的名稱*/private String tokenName = "X-Access-Token";/*** 文檔組配置*/private List<Group> groups;@Datapublic static class Group{private String modelName;/*** 組名稱*/private String name;/*** 組所屬的包*/private String packageName;}
}

4. properties配置

這里需要做一些說明:其中配置了排序相關和分模塊。還有默認訪問是全部文檔是展開的,可以配置默認合并。

# springdoc接口文檔配置 配置參考 springdoc.md
springdoc.api-docs.enabled=true
springdoc.swagger-ui.tags-sorter=alpha
springdoc.swagger-ui.operations-sorter=method
springdoc.group-configs[0].group=A-平臺管理
springdoc.group-configs[0].packages-to-scan[0]=auth.platform.service.platform
springdoc.group-configs[1].group=B-標簽管理
springdoc.group-configs[1].packages-to-scan[0]=auth.platform.service.tag
springdoc.group-configs[2].group=C-配置中心
springdoc.group-configs[2].packages-to-scan[0]=auth.platform.service.configcenter
springdoc.group-configs[3].group=D-日志管理
springdoc.group-configs[3].packages-to-scan[0]=auth.platform.service.log
springdoc.group-configs[4].group=F-監控管理
springdoc.group-configs[4].packages-to-scan[0]=auth.platform.service.monitor
springdoc.group-configs[5].group=G-文件管理
springdoc.group-configs[5].packages-to-scan[0]=auth.platform.service.file
springdoc.group-configs[6].group=H-WS消息管理
springdoc.group-configs[6].packages-to-scan[0]=auth.platform.service.websocket
# 該配置控制是否需要在界面顯示過濾框
springdoc.swagger-ui.filter=true
# 該配置主要控制swagger顯示是直接展開還是關閉 none 不默認展開  list 列出所有api  full直接展開所有api
springdoc.swagger-ui.doc-expansion=none

5. 訪問

http://localhost:8080/swagger-ui/index.html

在這里插入圖片描述

6. Controller示例

package com.omni.admin.controller;import com.omni.admin.common.result.ApiResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;/*** 接口信息表*/
@Tag(name = "接口管理")
@RestController
@RequestMapping("/api-info")
public class ApiInfoController {@Operation(summary = "測試接口文檔")@GetMapping("/demo")public ApiResult<Void> demo(){return ApiResult.success();}}

7. Springdoc-openapi 屬性

springdoc-openapi依賴于使用標準文件位置的標準 Spring 配置屬性(YML 或屬性)。

7.1. Springdoc-OpenAPI 核心屬性

參數名稱默認值描述
springdoc.api-docs.path/v3/api-docsString,用于 Json 格式的 OpenAPI 文檔的自定義路徑。
springdoc.api-docs.enabledtrueBoolean.禁用 springdoc-openapi 端點(默認為 /v3/api-docs)。
springdoc.packages-to-scan*List of Strings.要掃描的包列表(逗號分隔)
springdoc.paths-to-match/*List of Strings.要匹配的路徑列表(逗號分隔)
springdoc.produces-to-match-to/*List of Strings.生成要匹配的媒體類型列表(逗號分隔)
springdoc.headers-to-match/*List of Strings.要匹配的標頭列表(逗號分隔)
springdoc.consumptions-to-matchs./*List of Strings.要匹配的消耗媒體類型列表(逗號分隔)
springdoc.paths-to-excludeList of Strings.要排除的路徑列表(逗號分隔)
springdoc.packages-to-excludeList of Strings.要排除的包列表(逗號分隔)
springdoc.default-consumptions-media-typeapplication/jsonString.默認使用媒體類型。
springdoc.default-produces-media-type**/**String.默認生成媒體類型。
springdoc.cache.disabledfalseBoolean.禁用計算的 OpenAPI 的 springdoc-openapi 緩存。
彈簧文檔顯示執行器falseBoolean.顯示執行器端點。
springdoc.auto-tag-classestrueBoolean.禁用 springdoc-openapi 自動標記。
springdoc.model-and-view-allowfalseBoolean.允許帶有 ModelAndView 的 RestControllers 返回出現在 OpenAPI 描述中。
springdoc.override-with-generic-responsetrueBoolean.如果為 true,則自動將@ControllerAdvice響應添加到所有生成的響應中。
springdoc.api-docs.groups.enabledtrueBoolean.禁用 springdoc-openapi 組。
springdoc.group-configs[0].groupString.組名稱
springdoc.group-configs[0].displayNameString.組的顯示名稱。
springdoc.group-configs[0].packages-to-scan*List of Strings.要掃描組的包列表(逗號分隔)
springdoc.group-configs[0].paths-to-match/*List of Strings.要為組匹配的路徑列表(逗號分隔)
springdoc.group-configs[0].paths-to-exclude``List of Strings.要為組排除的路徑列表(逗號分隔)
springdoc.group-configs[0].packages-to-excludeList of Strings.要為組排除的包列表(逗號分隔)
springdoc.group-configs[0].produces-to-match/*List of Strings.生成要匹配的媒體類型列表(逗號分隔)
springdoc.group-configs[0].consumes-to-match/*List of Strings.要匹配的消耗媒體類型列表(逗號分隔)
springdoc.group-configs[0].headers-to-match/*List of Strings.要匹配的標頭列表(逗號分隔)
springdoc.webjars.prefix/webjarsString,要更改 webjars 前綴,該前綴可見 swagger-ui 的 URL 為 spring-webflux。
springdoc.api-docs.resolve-schema-propertiesfalseBoolean.在@Schema(名稱、標題和說明)上啟用屬性解析程序。
springdoc.remove-broken-reference-definitiontrueBoolean.禁用刪除損壞的引用定義。
springdoc.writer-with-default-pretty-printerfalseBoolean.啟用OpenApi規范的漂亮打印。
springdoc.model-converters.deprecating-converter.enabledtrueBoolean.禁用棄用模型轉換器。
springdoc.model-converters.polymorphic-converter.enabledtrueBoolean.禁用多態模型轉換器。
springdoc.model-converters.pageable-converter.enabledtrueBoolean.禁用可分頁模型轉換器。
springdoc.model-converters.sort-converter.enabledtrueBoolean.禁用排序轉換器。
springdoc.use-fqnfalseBoolean.啟用完全限定名稱。
springdoc.show-login-endpointfalseBoolean.使 Spring 安全登錄端點可見。
springdoc.pre-load-enabledfalseBoolean.預加載設置,用于在應用程序啟動時加載 OpenAPI。
springdoc.writer-with-order-by-keysfalseBoolean.啟用確定性/字母順序排序。
springdoc.use-management-portfalseBoolean.在執行器管理端口上公開招搖 UI。
springdoc.disable-i18nfalseBoolean.使用 i18n 禁用自動翻譯。
springdoc.show-spring-cloud-functionstrueBoolean.顯示彈簧云函數 Web 終結點。
springdoc.api-docs.versionopenapi_3_0String.選擇或(使用值 )。OpenAPI 3.0``OpenAPI 3.1``OPENAPI_3_1
springdoc.default-flat-paramObjectfalseBoolean.默認平展參數。
springdoc.default-support-form-datafalseBoolean.在指定 api 以接受表單數據時默認設置表單數據的參數。

7.2. swagger-ui 屬性

  • 上提供了對 swagger-ui 屬性的支持。請參閱官方文檔。springdoc-openapi
  • 您可以在文檔中使用與 Spring 引導屬性相同的 swagger-ui 屬性。
    在這里插入圖片描述
參數名稱默認值描述
springdoc.swagger-ui.path/swagger-ui.htmlString,用于 swagger-ui HTML 文檔的自定義路徑。
springdoc.swagger-ui.enabledtrueBoolean.禁用 swagger-ui 端點(默認情況下為 /swagger-ui.html)。
springdoc.swagger-ui.configUrl/v3/api-docs/swagger-configString.要從中獲取外部配置文檔的 URL。
springdoc.swagger-ui.layoutBaseLayoutString.通過插件系統提供的組件的名稱,用作 Swagger UI 的頂級布局。
springdoc.swagger-ui.validatorUrlvalidator.swagger.io/validator默認情況下,Swagger UI 會嘗試根據 swagger.io 的在線驗證器驗證規范。您可以使用此參數設置不同的驗證程序 URL,例如,對于本地部署的驗證程序驗證程序徽章。將其設置為 ,或者將禁用驗證。none``127.0.0.1``localhost
springdoc.swagger-ui.tryItOutEnabledfalseBoolean.控制默認情況下是否應啟用“試用”部分。
springdoc.swagger-ui.filterfalseBoolean OR String.如果設置,則啟用篩選。頂部欄將顯示一個編輯框,可用于篩選顯示的標記操作。可以是用于啟用或禁用的布爾值,也可以是字符串,在這種情況下,將使用該字符串作為篩選器表達式啟用篩選。篩選區分大小寫,與標記內任意位置的篩選器表達式匹配。
springdoc.swagger-ui.operationsSorterFunction=(a ? a).對每個 API 的操作列表應用排序。它可以是“alpha”(按路徑字母數字排序),“method”(按HTTP方法排序)或函數(參見Array.prototype.sort()以了解排序函數的工作原理)。默認值為服務器返回的順序不變。
springdoc.swagger-ui.tagsSorterFunction=(a ? a).對每個 API 的標記列表應用排序。它可以是“alpha”(按路徑字母數字排序)或函數,請參閱 Array.prototype.sort() 以學習如何編寫排序函數)。每次傳遞時,將兩個標記名稱字符串傳遞給分揀機。默認值是由 Swagger UI 確定的順序。
springdoc.swagger-ui.oauth2RedirectUrl/swagger-ui/oauth2-redirect.htmlString.OAuth 重定向網址。
springdoc.swagger-ui.displayOperationIdfalseBoolean.控制操作 ID 在操作列表中的顯示。缺省值為 。false
springdoc.swagger-ui.displayRequestDurationfalseBoolean.控制“試用”請求的請求持續時間(以毫秒為單位)的顯示。
springdoc.swagger-ui.deepLinkfalseBoolean.如果設置為 ,則啟用標簽和操作的深層鏈接。有關更多信息,請參閱 [深層鏈接文檔](/docs/usage/deep-linking.md)。true
springdoc.swagger-ui.defaultModelsExpandDepth1Number.模型的默認擴展深度(設置為 -1 將完全隱藏模型)。
springdoc.swagger-ui.defaultModelExpandDepth1Number.模型示例部分上模型的默認擴展深度。
springdoc.swagger-ui.defaultModelRenderingString=["example"*, "model"].控制首次呈現 API 時模型的顯示方式。(用戶始終可以通過單擊“模型”和“示例值”鏈接來切換給定模型的渲染。
springdoc.swagger-ui.docExpansionString=["list"*, "full", "none"].控制操作和標記的默認展開設置。它可以是“列表”(僅展開標簽)、“完整”(展開標簽和操作)或“無”(不展開任何內容)。
springdoc.swagger-ui.maxDisplayTagsNumber.如果設置,將顯示的標記操作數限制為最多此數量。默認值為顯示所有操作。
springdoc.swagger-ui.showExtensionsfalseBoolean.控制供應商擴展 () 字段和操作、參數和架構的值的顯示。x-
springdoc.swagger-ui.urlString.要配置,自定義 OpenAPI 文件的路徑。如果使用,將被忽略。urls
springdoc.swagger-ui.showCommonExtensionsfalseBoolean.控制參數的擴展 (、、、、) 字段和值的顯示。pattern``maxLength``minLength``maximum``minimum
springdoc.swagger-ui.supportedSubmitMethodsArray=["get", "put", "post", "delete", "options", "head", "patch", "trace"].啟用了“試用”功能的 HTTP 方法列表。空數組禁用所有操作的“試用”。這不會從顯示中過濾操作。
springdoc.swagger-ui.queryConfigEnabledfalseBoolean.自 以來禁用。此參數啟用(舊版)通過 URL 搜索參數覆蓋配置參數。在啟用此功能之前,請參閱安全公告。v1.6.0
springdoc.swagger-ui.oauth. additionalQueryStringParamsString.添加到授權 URL 和令牌 URL 的其他查詢參數。
springdoc.swagger-ui.disable-swagger-default-urlfalseBoolean.禁用 swagger-ui 默認寵物商店網址。(從 v1.4.1 開始可用)。
springdoc.swagger-ui.urls[0].urlURL.Topbar 插件使用的 swagger 組的 url。URL 在此數組中的所有項中必須是唯一的,因為它們用作標識符。
springdoc.swagger-ui.urls[0].nameString.Topbar 插件使用的 swagger 組的名稱。名稱在此數組中的所有項中必須是唯一的,因為它們用作標識符。
springdoc.swagger-ui.urlsPrimaryNameString.加載 Swagger UI 時將顯示的招搖組的名稱。
springdoc.swagger-ui.oauth.clientIdString.默認客戶端 ID。必須是字符串。
springdoc.swagger-ui.oauth.clientSecretString.默認客戶端機密。切勿在生產環境中使用此參數。它公開了重要的安全信息。此功能僅適用于開發/測試環境。
springdoc.swagger-ui.oauth.realmString.領域查詢參數(適用于 OAuth 1)已添加到授權 URL 和令牌 URL。
springdoc.swagger-ui.oauth.appNameString.OAuth 應用程序名稱,顯示在授權彈出窗口中。
springdoc.swagger-ui.oauth.scopeSeparatorString.用于傳遞范圍的 OAuth 范圍分隔符,在調用之前進行編碼,默認值為空格(編碼值 %20)。
springdoc.swagger-ui.csrf.enabledfalseBoolean.啟用 CSRF 支持
springdoc.swagger-ui.csrf.use-local-storagefalseBoolean.從本地存儲獲取 CSRF 令牌。
springdoc.swagger-ui.csrf.use-session-storagefalseBoolean.從會話存儲中獲取 CSRF 令牌。
springdoc.swagger-ui.csrf.cookie-nameXSRF-TOKENString.可選的 CSRF,用于設置 CSRF cookie 名稱。
springdoc.swagger-ui.csrf.header-nameX-XSRF-TOKENString.可選的 CSRF,用于設置 CSRF 標頭名稱。
springdoc.swagger-ui.syntaxHighlight.activatedtrueBoolean.是否應激活語法突出顯示。
springdoc.swagger-ui.syntaxHighlight.themeagateString…突出顯示.js要使用的語法著色主題。(只有這 6 種樣式可用。String=["agate"*, "arta", "monokai", "nord", "obsidian", "tomorrow-night"]
springdoc.swagger-ui.oauth. useBasicAuthentication WithAccessCodeGrantfalseBoolean.僅針對訪問代碼流激活。在對 tokenURL 的authorization_code請求期間,使用 HTTP 基本身份驗證方案(具有基本 base64encode(client_id + client_secret)的授權標頭)傳遞客戶端密碼。
springdoc.swagger-ui.oauth. usePkceWithAuthorization CodeGrantfalseBoolean.僅適用于授權代碼流。代碼交換的證明密鑰為 OAuth 公共客戶端帶來了增強的安全性。
springdoc.swagger-ui.persistAuthorizationfalseBoolean.如果設置為 true,它將保留授權數據,并且在瀏覽器關閉/刷新時不會丟失
springdoc.swagger-ui.use-root-pathfalseBoolean.如果設置為 true,則可以直接從應用程序根路徑訪問 swagger-u。

8. Springdoc-openapi 實例

8.1. springdoc 應用實例

在這里插入圖片描述

8.2 演示應用程序的源代碼

https://github.com/springdoc/springdoc-openapi-demos.git

9. 從SpringFox遷移

  • 刪除 springfox 和 swagger 2 依賴項。改為添加依賴項。springdoc-openapi-ui
 <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <version>1.6.14</version> </dependency>
  • 將 swagger 2 注釋替換為 swagger 3 注釋(它已包含在依賴項中)。 招搖 3 注釋的包是 .springdoc-openapi-ui``io.swagger.v3.oas.annotations
    • @Api@Tag
    • @ApiIgnore→或或@Parameter(hidden = true)``@Operation(hidden = true)``@Hidden
    • @ApiImplicitParam@Parameter
    • @ApiImplicitParams@Parameters
    • @ApiModel@Schema
    • @ApiModelProperty(hidden = true)@Schema(accessMode = READ_ONLY)
    • @ApiModelProperty@Schema
    • @ApiOperation(value = "foo", notes = "bar")@Operation(summary = "foo", description = "bar")
    • @ApiParam@Parameter
    • @ApiResponse(code = 404, message = "foo")@ApiResponse(responseCode = "404", description = "foo")
  • 如果使用對象捕獲多個請求查詢參數,請使用@ParameterObject
  • 此步驟是可選的:僅當您有多個 bean 時,才將它們替換為 bean。Docket``GroupedOpenApi

以前:

 @Bean public Docket publicApi() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("org.github.springshop.web.public")) .paths(PathSelectors.regex("/public.*")) .build() .groupName("springshop-public") .apiInfo(apiInfo()); } @Bean public Docket adminApi() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("org.github.springshop.web.admin")) .paths(PathSelectors.regex("/admin.*")) .apis(RequestHandlerSelectors.withMethodAnnotation(Admin.class)) .build() .groupName("springshop-admin") .apiInfo(apiInfo()); }

現在:

 @Bean public GroupedOpenApi publicApi() { return GroupedOpenApi.builder() .group("springshop-public") .pathsToMatch("/public/**") .build(); } @Bean public GroupedOpenApi adminApi() { return GroupedOpenApi.builder() .group("springshop-admin") .pathsToMatch("/admin/**") .addMethodFilter(method -> method.isAnnotationPresent(Admin.class)) .build(); }

如果你只有一個 - 刪除它,而是將屬性添加到你的 :Docket``application.properties

springdoc.packagesToScan=package1, package2
springdoc.pathsToMatch=/v1, /api/balance/**
 @Bean public OpenAPI springShopOpenAPI() { return new OpenAPI() .info(new Info().title("SpringShop API") .description("Spring shop sample application") .version("v0.0.1") .license(new License().name("Apache 2.0").url("http://springdoc.org"))) .externalDocs(new ExternalDocumentation() .description("SpringShop Wiki Documentation") .url("https://springshop.wiki.github.org/docs")); }

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/63763.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/63763.shtml
英文地址,請注明出處:http://en.pswp.cn/web/63763.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

GFPS擴展技術原理(七)-音頻切換消息流

音頻切換消息流 Seeker和Provider通過消息流來同步音頻切換能力&#xff0c;觸發連接做切換&#xff0c;獲取或設置音頻切換偏好&#xff0c;通知連接狀態等等。為此專門定義了音頻切換消息流Message Group 為0x07&#xff0c;Message codes如下&#xff1a; MAC of Audio s…

LiteFlow決策系統的策略模式,順序、最壞、投票、權重

個人博客&#xff1a;無奈何楊&#xff08;wnhyang&#xff09; 個人語雀&#xff1a;wnhyang 共享語雀&#xff1a;在線知識共享 Github&#xff1a;wnhyang - Overview 想必大家都有聽過或做過職業和性格測試吧&#xff0c;尤其是現在的畢業生&#xff0c;在投了簡歷之后經…

【計算機視覺基礎CV-圖像分類】02-入門詳解圖像分類、經典數據集、比賽與冠軍圖像模型演進史

前言 圖像分類&#xff08;Image Classification&#xff09;是計算機視覺&#xff08;Computer Vision&#xff09;中一項基礎且核心的任務。簡單來說&#xff0c;就是讓計算機從給定的類別集合中&#xff0c;為一張輸入圖片分配一個正確的類別標簽。這個過程聽起來直觀&…

三子棋游戲(基礎版)

我們用 C 語言代碼實現了一個簡單的控制臺版三子棋游戲&#xff0c;代碼分為三個部分&#xff0c;分別是頭文件game.h中定義的函數聲明以及兩個源文件game.c和test.c、game.c文件。 1.頭文件&#xff08;game.h&#xff09;部分 首先包含了<stdio.h>&#xff08;用于標…

使用Chat-LangChain模塊創建一個與用戶交流的機器人

當然&#xff01;要使用Chat-LangChain模塊創建一個與用戶交流的機器人&#xff0c;你需要安裝并配置一些Python庫。以下是一個基本的步驟指南和示例代碼&#xff0c;幫助你快速上手。 安裝依賴庫 首先&#xff0c;你需要安裝langchain庫&#xff0c;它是一個高級框架&#x…

嵌入式驅動開發詳解20(IIO驅動架構)

文章目錄 前言IIO子系統簡介主要結構體主要API函數 IIO子系統實現SPI框架IIO框架IIO通道詳解通道結構體分析通道命名分析icm20608設備通道實現 讀取函數寫入函數 測試測試效果命令行讀取應用程序讀取 后續參考文獻 前言 IIO 全稱是 Industrial I/O&#xff0c;翻譯過來就是工業…

Linux 網絡維護相關命令簡介

目錄 零. 概要一. ping二. ip命令2.1 ip address2.2 ip route2.3 ip neighbour 三. traceroute四. DNS查詢4.1 nslookup4.2 dig 五. ss 查看網絡連接狀態 零. 概要 ?在Linux系統中有2套用于網絡管理的工具集 net-tools 早期網絡管理的主要工具集&#xff0c;缺乏對 IPv6、網…

Jenkins持續集成部署——jenkins安裝

前言 Jenkins 是一個開源的自動化服務器&#xff0c;主要用于持續集成&#xff08;CI&#xff09;和持續交付&#xff08;CD&#xff09;。它為軟件開發團隊提供了一個易于使用的平臺來自動化構建、測試和部署應用程序的過程。 Jenkins 主要功能 1. 持續集成 (CI) 自動構建…

PYG - Cora數據集加載 (自動加載+手動實現)

本文從Cora的例子來展示PYG如何加載圖數據集。 Cora 是一個小型的有標注的圖數據集&#xff0c;包含以下內容&#xff1a; data.x&#xff1a;2708 個節點&#xff08;即 2708 篇論文&#xff09;&#xff0c;每個節點有 1433 個特征&#xff0c;形狀為 (2708, 1433)。data.ed…

《 火星人 》

題目描述 人類終于登上了火星的土地并且見到了神秘的火星人。人類和火星人都無法理解對方的語言&#xff0c;但是我們的科學家發明了一種用數字交流的方法。這種交流方法是這樣的&#xff0c;首先&#xff0c;火星人把一個非常大的數字告訴人類科學家&#xff0c;科學家破解這…

機器學習基礎算法 (二)-邏輯回歸

python 環境的配置參考 從零開始&#xff1a;Python 環境搭建與工具配置 邏輯回歸是一種用于解決二分類問題的機器學習算法&#xff0c;它可以預測輸入數據屬于某個類別的概率。本文將詳細介紹邏輯回歸的原理、Python 實現、模型評估和調優&#xff0c;并結合垃圾郵件分類案例進…

BiTCN-BiGRU基于雙向時間卷積網絡結合雙向門控循環單元的數據多特征分類預測(多輸入單輸出)

Matlab實現BiTCN-BiGRU基于雙向時間卷積網絡結合雙向門控循環單元的數據多特征分類預測&#xff08;多輸入單輸出&#xff09; 目錄 Matlab實現BiTCN-BiGRU基于雙向時間卷積網絡結合雙向門控循環單元的數據多特征分類預測&#xff08;多輸入單輸出&#xff09;分類效果基本描述…

云備份項目--工具類編寫

4. 文件工具類的設計 4.1 整體的類 該類實現對文件進行操作 FileUtil.hpp如下 /* 該類實現對文件進行操作 */ #pragma once #include <iostream> #include <string> #include <fstream> #include <vector> #include <sys/types.h> #include …

51c大模型~合集94

我自己的原文哦~ https://blog.51cto.com/whaosoft/12897659 #D(R,O) Grasp 重塑跨智能體靈巧手抓取&#xff0c;NUS邵林團隊提出全新交互式表征&#xff0c;斬獲CoRL Workshop最佳機器人論文獎 本文的作者均來自新加坡國立大學 LinS Lab。本文的共同第一作者為上海交通大…

【大學英語】英語范文十八篇,書信,議論文,材料分析

關注作者了解更多 我的其他CSDN專欄 過程控制系統 工程測試技術 虛擬儀器技術 可編程控制器 工業現場總線 數字圖像處理 智能控制 傳感器技術 嵌入式系統 復變函數與積分變換 單片機原理 線性代數 大學物理 熱工與工程流體力學 數字信號處理 光電融合集成電路…

一起學Git【第一節:Git的安裝】

Git是什么&#xff1f; Git是什么&#xff1f;相信大家點擊進來已經有了初步的認識&#xff0c;這里就簡單的進行介紹。 Git是一個開源的分布式版本控制系統&#xff0c;由Linus Torvalds創建&#xff0c;用于有效、高速地處理從小到大的項目版本管理。Git是目前世界上最流行…

消息隊列 Kafka 架構組件及其特性

Kafka 人們通常有時會將 Kafka 中的 Topic 比作隊列&#xff1b; 在 Kafka 中&#xff0c;數據是以主題&#xff08;Topic&#xff09;的形式組織的&#xff0c;每個 Topic 可以被分為多個分區&#xff08;Partition&#xff09;。每個 Partition 是一個有序的、不可變的消息…

《Mycat核心技術》第06章:Mycat問題處理總結

作者&#xff1a;冰河 星球&#xff1a;http://m6z.cn/6aeFbs 博客&#xff1a;https://binghe.gitcode.host 文章匯總&#xff1a;https://binghe.gitcode.host/md/all/all.html 星球項目地址&#xff1a;https://binghe.gitcode.host/md/zsxq/introduce.html 沉淀&#xff0c…

【day11】面向對象編程進階(繼承)

概述 本文深入探討面向對象編程的核心概念&#xff0c;包括繼承、方法重寫、this和super關鍵字的使用&#xff0c;以及抽象類和方法的定義與實現。通過本文的學習&#xff0c;你將能夠&#xff1a; 理解繼承的優勢。掌握繼承的使用方法。了解繼承后成員變量和成員方法的訪問特…

隨手記:小程序兼容后臺的wangEditor富文本配置鏈接

場景&#xff1a; 在后臺配置wangEditor富文本&#xff0c;可以文字配置鏈接&#xff0c;圖片配置鏈接&#xff0c;產生的json格式為&#xff1a; 例子&#xff1a; <h1><a href"https://uniapp.dcloud.net.cn/" target"_blank"><span sty…