当前位置: 首页 > article >正文

Spring Boot API 文档与 OpenAPI 集成最佳实践

Spring Boot API 文档与 OpenAPI 集成最佳实践引言API 文档是现代软件开发中不可或缺的一部分它不仅帮助前端开发者理解如何调用后端接口也是团队协作和维护的重要参考。Spring Boot 提供了丰富的工具来自动生成 API 文档其中最流行的是基于 OpenAPI 规范的 Swagger UI。本文将深入探讨如何在 Spring Boot 项目中集成 OpenAPI创建高质量的 API 文档。一、OpenAPI 与 Swagger 概述1.1 OpenAPI 规范OpenAPI 规范前身为 Swagger 规范是一个用于描述 RESTful API 的标准化格式。它允许开发者定义 API 的结构和行为自动生成客户端 SDK生成交互式文档进行 API 测试和验证1.2 Swagger UISwagger UI 是一个基于 OpenAPI 规范的交互式文档工具提供可视化的 API 文档展示在线接口测试功能请求/响应示例展示支持多种认证方式二、SpringDoc OpenAPI 集成2.1 添加依赖dependency groupIdorg.springdoc/groupId artifactIdspringdoc-openapi-starter-webmvc-ui/artifactId version2.3.0/version /dependency2.2 基础配置springdoc: api-docs: path: /api-docs enabled: true swagger-ui: path: /swagger-ui.html enabled: true tags-sorter: alpha operations-sorter: alpha info: title: Order Service API description: 订单服务 RESTful API 文档 version: 1.0.0 contact: name: API Support email: supportexample.com2.3 配置类import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Contact; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; import io.swagger.v3.oas.models.servers.Server; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import java.util.List; Configuration public class OpenApiConfig { Value(${server.port:8080}) private String serverPort; Bean public OpenAPI customOpenAPI() { return new OpenAPI() .info(new Info() .title(订单服务 API) .version(1.0.0) .description(订单服务 RESTful API 文档提供订单创建、查询、更新和删除功能) .contact(new Contact() .name(技术支持) .email(supportexample.com) .url(https://example.com)) .license(new License() .name(Apache 2.0) .url(https://www.apache.org/licenses/LICENSE-2.0))) .servers(List.of( new Server().url(http://localhost: serverPort).description(本地开发环境), new Server().url(http://staging.example.com).description(预生产环境), new Server().url(https://api.example.com).description(生产环境) )); } }三、API 文档注解详解3.1 控制器级别注解import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; RestController RequestMapping(/api/orders) Tag(name 订单管理, description 订单的 CRUD 操作接口) public class OrderController { private final OrderService orderService; public OrderController(OrderService orderService) { this.orderService orderService; } }3.2 方法级别注解Operation( summary 创建订单, description 根据订单请求创建新订单返回创建的订单详情, tags {订单管理}, security {SecurityRequirement(name bearerAuth)} ) ApiResponses(value { ApiResponse(responseCode 201, description 订单创建成功, content Content(schema Schema(implementation OrderResponse.class))), ApiResponse(responseCode 400, description 请求参数无效), ApiResponse(responseCode 401, description 未授权访问), ApiResponse(responseCode 500, description 服务器内部错误) }) PostMapping public ResponseEntityOrderResponse createOrder( Valid RequestBody OrderRequest request) { OrderResponse response orderService.createOrder(request); return ResponseEntity.status(HttpStatus.CREATED).body(response); }3.3 参数级别注解Operation(summary 查询订单详情, description 根据订单ID查询订单详细信息) ApiResponses(value { ApiResponse(responseCode 200, description 查询成功), ApiResponse(responseCode 404, description 订单不存在) }) GetMapping(/{orderId}) public ResponseEntityOrderResponse getOrderById( Parameter(description 订单ID, required true, example 12345) PathVariable Long orderId) { OrderResponse response orderService.getOrderById(orderId); return ResponseEntity.ok(response); }3.4 分页查询示例Operation(summary 分页查询订单列表, description 根据条件分页查询订单列表) ApiResponses(value { ApiResponse(responseCode 200, description 查询成功) }) GetMapping public ResponseEntityPageResponseOrderResponse listOrders( Parameter(description 页码从0开始, example 0) RequestParam(defaultValue 0) int page, Parameter(description 每页大小, example 10) RequestParam(defaultValue 10) int size, Parameter(description 订单状态, example PENDING) RequestParam(required false) String status, Parameter(description 客户ID, example cust-001) RequestParam(required false) String customerId) { PageOrderResponse orders orderService.listOrders(page, size, status, customerId); return ResponseEntity.ok(PageResponse.from(orders)); }四、数据模型定义4.1 请求模型import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Positive; import javax.validation.constraints.Size; import java.math.BigDecimal; import java.util.List; Data Schema(description 订单创建请求) public class OrderRequest { NotBlank(message 客户ID不能为空) Size(max 50, message 客户ID长度不能超过50) Schema(description 客户ID, example cust-001, requiredMode Schema.RequiredMode.REQUIRED) private String customerId; NotNull(message 订单金额不能为空) Positive(message 订单金额必须大于0) Schema(description 订单金额, example 99.99, requiredMode Schema.RequiredMode.REQUIRED) private BigDecimal amount; Schema(description 订单备注, example 加急订单) private String remark; Size(max 100, message 商品数量不能超过100) Schema(description 订单项列表) private ListOrderItemRequest items; Data Schema(description 订单项请求) public static class OrderItemRequest { NotBlank(message 商品ID不能为空) Schema(description 商品ID, example prod-001, requiredMode Schema.RequiredMode.REQUIRED) private String productId; NotNull(message 数量不能为空) Positive(message 数量必须大于0) Schema(description 数量, example 2, requiredMode Schema.RequiredMode.REQUIRED) private Integer quantity; NotNull(message 单价不能为空) Positive(message 单价必须大于0) Schema(description 单价, example 49.99, requiredMode Schema.RequiredMode.REQUIRED) private BigDecimal unitPrice; } }4.2 响应模型import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List; Data Schema(description 订单响应) public class OrderResponse { Schema(description 订单ID, example ord-12345) private String id; Schema(description 客户ID, example cust-001) private String customerId; Schema(description 订单金额, example 99.99) private BigDecimal amount; Schema(description 订单状态, example PENDING, allowableValues {PENDING, PAID, SHIPPED, COMPLETED, CANCELLED}) private String status; Schema(description 订单备注, example 加急订单) private String remark; Schema(description 创建时间) private LocalDateTime createdAt; Schema(description 更新时间) private LocalDateTime updatedAt; Schema(description 订单项列表) private ListOrderItemResponse items; Data Schema(description 订单项响应) public static class OrderItemResponse { Schema(description 订单项ID, example item-001) private String id; Schema(description 商品ID, example prod-001) private String productId; Schema(description 商品名称, example iPhone 15 Pro) private String productName; Schema(description 数量, example 2) private Integer quantity; Schema(description 单价, example 49.99) private BigDecimal unitPrice; Schema(description 小计, example 99.98) private BigDecimal subtotal; } }4.3 分页响应模型import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.data.domain.Page; import java.util.List; import java.util.function.Function; Data Schema(description 分页响应) public class PageResponseT { Schema(description 数据列表) private ListT content; Schema(description 当前页码, example 0) private int page; Schema(description 每页大小, example 10) private int size; Schema(description 总元素数, example 100) private long totalElements; Schema(description 总页数, example 10) private int totalPages; Schema(description 是否为第一页, example true) private boolean first; Schema(description 是否为最后一页, example false) private boolean last; public static T, R PageResponseR from(PageT page, FunctionT, R converter) { PageResponseR response new PageResponse(); response.setContent(page.getContent().stream().map(converter).toList()); response.setPage(page.getNumber()); response.setSize(page.getSize()); response.setTotalElements(page.getTotalElements()); response.setTotalPages(page.getTotalPages()); response.setFirst(page.isFirst()); response.setLast(page.isLast()); return response; } public static T PageResponseT from(PageT page) { return from(page, t - t); } }五、安全认证配置5.1 Bearer Token 认证import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; Configuration public class OpenApiSecurityConfig { Bean public OpenAPI customOpenAPI() { final String securitySchemeName bearerAuth; return new OpenAPI() .addSecurityItem(new SecurityRequirement().addList(securitySchemeName)) .components(new Components() .addSecuritySchemes(securitySchemeName, new SecurityScheme() .name(securitySchemeName) .type(SecurityScheme.Type.HTTP) .scheme(bearer) .bearerFormat(JWT))); } }5.2 API Key 认证Configuration public class OpenApiSecurityConfig { Bean public OpenAPI customOpenAPI() { return new OpenAPI() .addSecurityItem(new SecurityRequirement().addList(apiKey)) .components(new Components() .addSecuritySchemes(apiKey, new SecurityScheme() .name(X-API-Key) .type(SecurityScheme.Type.APIKEY) .in(SecurityScheme.In.HEADER))); } }5.3 多认证方式Configuration public class OpenApiSecurityConfig { Bean public OpenAPI customOpenAPI() { return new OpenAPI() .addSecurityItem(new SecurityRequirement().addList(bearerAuth)) .addSecurityItem(new SecurityRequirement().addList(apiKey)) .components(new Components() .addSecuritySchemes(bearerAuth, new SecurityScheme() .name(bearerAuth) .type(SecurityScheme.Type.HTTP) .scheme(bearer) .bearerFormat(JWT)) .addSecuritySchemes(apiKey, new SecurityScheme() .name(X-API-Key) .type(SecurityScheme.Type.APIKEY) .in(SecurityScheme.In.HEADER))); } }六、高级配置6.1 全局响应示例import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.media.Content; import io.swagger.v3.oas.models.media.MediaType; import io.swagger.v3.oas.models.responses.ApiResponse; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; Configuration public class OpenApiResponseConfig { Bean public OpenAPI customOpenAPI() { return new OpenAPI() .components(new Components() .addResponses(BadRequest, createErrorResponse(400, 请求参数无效)) .addResponses(Unauthorized, createErrorResponse(401, 未授权访问)) .addResponses(Forbidden, createErrorResponse(403, 禁止访问)) .addResponses(NotFound, createErrorResponse(404, 资源不存在)) .addResponses(InternalServerError, createErrorResponse(500, 服务器内部错误))); } private ApiResponse createErrorResponse(String code, String message) { Example example new Example(); example.setValue({\code\: \ code \, \message\: \ message \}); MediaType mediaType new MediaType(); mediaType.addExamples(application/json, example); Content content new Content(); content.addMediaType(application/json, mediaType); return new ApiResponse() .description(message) .content(content); } }6.2 自定义过滤器import org.springdoc.core.customizers.OpenApiCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; Configuration public class OpenApiCustomConfig { Bean public OpenApiCustomizer customOpenApiCustomizer() { return openApi - { // 自定义操作 openApi.getPaths().values().forEach(pathItem - pathItem.readOperations().forEach(operation - { // 添加统一的响应头 operation.getResponses().values().forEach(response - { if (response.getHeaders() null) { response.headers(new HashMap()); } response.getHeaders().put(X-Request-Id, new Header().description(请求ID)); }); }) ); }; } }6.3 隐藏敏感接口import io.swagger.v3.oas.annotations.Hidden; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; RestController RequestMapping(/internal) Hidden public class InternalController { GetMapping(/health) public String health() { return OK; } }七、API 文档生成7.1 生成 JSON/YAML 格式文档# 访问 API 文档 JSON 格式 curl http://localhost:8080/api-docs # 访问 API 文档 YAML 格式 curl http://localhost:8080/api-docs.yaml7.2 生成静态文档添加依赖dependency groupIdorg.springdoc/groupId artifactIdspringdoc-openapi-starter-webmvc-api/artifactId version2.3.0/version /dependency配置 Maven 插件plugin groupIdorg.springdoc/groupId artifactIdspringdoc-openapi-maven-plugin/artifactId version1.3/version executions execution idgenerate-docs/id goals goalgenerate/goal /goals configuration apiDocsUrlhttp://localhost:8080/api-docs/apiDocsUrl outputFileNameopenapi.json/outputFileName outputDir${project.build.directory}/outputDir /configuration /execution /executions /plugin7.3 生成客户端 SDK使用 OpenAPI Generator 生成客户端代码# 安装 OpenAPI Generator npm install openapitools/openapi-generator-cli -g # 生成 Java 客户端 openapi-generator-cli generate \ -i http://localhost:8080/api-docs \ -g java \ -o ./client \ --api-package com.example.api \ --model-package com.example.model \ --group-id com.example \ --artifact-id order-client \ --artifact-version 1.0.0八、测试集成8.1 使用 MockMvc 测试 APIimport org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; SpringBootTest AutoConfigureMockMvc class OrderControllerTest { Autowired private MockMvc mockMvc; Test void testCreateOrder() throws Exception { String requestBody { customerId: cust-001, amount: 99.99, items: [ {productId: prod-001, quantity: 2, unitPrice: 49.99} ] } ; mockMvc.perform(post(/api/orders) .contentType(MediaType.APPLICATION_JSON) .content(requestBody)) .andExpect(status().isCreated()) .andExpect(jsonPath($.customerId).value(cust-001)) .andExpect(jsonPath($.amount).value(99.99)); } }九、最佳实践9.1 文档组织策略按功能模块分组使用Tag注解将相关接口分组统一命名规范保持 API 路径和参数命名风格一致提供示例数据为每个参数和响应提供真实的示例值版本控制使用 API 版本号如/api/v1/orders9.2 文档维护代码即文档通过注解定义文档避免文档与代码脱节自动化测试确保 API 文档与实际实现一致定期审查定期检查和更新文档内容9.3 性能优化延迟加载对于大型 API使用延迟加载减少初始加载时间缓存策略缓存 API 文档减少重复生成开销按需加载根据用户权限只展示可访问的接口结语SpringDoc OpenAPI 为 Spring Boot 项目提供了强大的 API 文档生成能力。通过合理使用注解和配置可以创建高质量的交互式 API 文档提升团队协作效率和 API 可维护性。在实际项目中应结合安全认证、版本控制和自动化测试构建完整的 API 文档体系。

相关文章:

Spring Boot API 文档与 OpenAPI 集成最佳实践

Spring Boot API 文档与 OpenAPI 集成最佳实践 引言 API 文档是现代软件开发中不可或缺的一部分,它不仅帮助前端开发者理解如何调用后端接口,也是团队协作和维护的重要参考。Spring Boot 提供了丰富的工具来自动生成 API 文档,其中最流行的…...

OBS多平台直播终极指南:如何一键同步推流到所有主流平台

OBS多平台直播终极指南:如何一键同步推流到所有主流平台 【免费下载链接】obs-multi-rtmp OBS複数サイト同時配信プラグイン 项目地址: https://gitcode.com/gh_mirrors/ob/obs-multi-rtmp 你是否曾经为了同时在多个直播平台开播而手忙脚乱?每次都…...

ClawX:桌面化AI Agent编排平台,降低OpenClaw使用门槛

1. 项目概述:ClawX,为OpenClaw AI Agent打造的桌面门户如果你和我一样,对AI Agent(智能体)的潜力感到兴奋,但又对在终端里敲命令、编辑YAML配置文件、管理进程这些繁琐操作感到头疼,那么ClawX的…...

Linux Deadline 调度器的任务出队:dl_dequeue_task 的实现

简介在 Linux 内核调度体系中,SCHED_DEADLINE作为硬实时调度策略,依托EDF 最早截止时间优先与CBS 恒定带宽服务器两大核心算法,承载着工业控制、自动驾驶域控制器、航空航天实时测控、5G 基带处理、专业音视频低延迟编解码等对时间确定性、调…...

你的桌面需要一个会思考的伙伴吗?DyberPet让虚拟宠物拥有情感与智慧

你的桌面需要一个会思考的伙伴吗?DyberPet让虚拟宠物拥有情感与智慧 【免费下载链接】DyberPet Desktop Cyber Pet Framework based on PySide6 项目地址: https://gitcode.com/GitHub_Trending/dy/DyberPet 每天面对冰冷的屏幕,你是否曾幻想过有…...

连接器选型三张“底牌”:电源、高速、射频的隐性代价与系统级权衡

当产品进入量产阶段,连接器往往是“压死骆驼的最后一根稻草”。它不像芯片那样有明确的数据手册边界,也不像PCB那样可归咎于Layout规则。连接器的失效模式高度依赖“配合状态”——插拔了几次?压接用了什么工具?相邻器件发热多少&…...

无需联网!Win11 本地 AI 工具 OpenClaw 部署详解

前言 OpenClaw(小龙虾 AI)作为 2026 年备受关注的本地 AI 自动化工具,全程无需依赖网络与云端账号,通过自然语言指令就能完成电脑操作自动化处理,有效提升日常办公与文件管理效率。 安装前重要提醒(必看&a…...

Switch大气层系统:从零开始掌握自定义固件的完整指南

Switch大气层系统:从零开始掌握自定义固件的完整指南 【免费下载链接】Atmosphere-stable 大气层整合包系统稳定版 项目地址: https://gitcode.com/gh_mirrors/at/Atmosphere-stable 大气层系统(Atmosphere)是任天堂Switch平台上最强大…...

Go语言轻量级代理工具curxy:命令行驱动的HTTP/S请求转发与Mock服务器实践

1. 项目概述:一个轻量级的本地代理工具最近在折腾一些本地开发环境,特别是需要处理跨域请求或者模拟特定网络环境时,总是绕不开代理这个环节。用 Nginx 配置吧,对于简单的转发需求来说有点重;用 Node.js 写个简单的 HT…...

凌扬微优势代理 LY3508 4.2V/1A充电/1.6A驱动 全桥马达驱动控制芯片 ESOP8 技术解析

在电动牙刷、智能垃圾桶等单节锂电池供电的马达类产品中,需要一款集成锂电池充电管理和全桥马达驱动的芯片,以实现电机正反转、刹车控制,并简化外围电路设计。LY3508是一款集成了锂电池充电管理模块、全桥马达驱动模块、续流二极管和逻辑控制…...

使用Curxy代理连接Cursor编辑器与本地Ollama大模型

1. 项目概述:为什么我们需要一个本地AI代理 如果你和我一样,是个重度依赖Cursor这类AI驱动的代码编辑器来提高生产力的开发者,那你肯定遇到过这个痛点:想用自己本地部署的、性能强大的Ollama模型,却发现Cursor编辑器死…...

抖音无水印下载神器:3分钟搞定批量下载,小白也能轻松上手

抖音无水印下载神器:3分钟搞定批量下载,小白也能轻松上手 【免费下载链接】douyin-downloader A practical Douyin downloader for both single-item and profile batch downloads, with progress display, retries, SQLite deduplication, and browser …...

终极音频解密指南:3分钟解锁QQ音乐加密格式

终极音频解密指南:3分钟解锁QQ音乐加密格式 【免费下载链接】qmc-decoder Fastest & best convert qmc 2 mp3 | flac tools 项目地址: https://gitcode.com/gh_mirrors/qm/qmc-decoder 想要让QQ音乐下载的加密歌曲在任何播放器上自由播放吗?q…...

百度网盘秒传技术终极指南:打破文件分享的时间限制

百度网盘秒传技术终极指南:打破文件分享的时间限制 【免费下载链接】rapid-upload-userscript-doc 秒传链接提取脚本 - 文档&教程 项目地址: https://gitcode.com/gh_mirrors/ra/rapid-upload-userscript-doc 在数字信息爆炸的时代,文件分享已…...

终极AI图层分离指南:如何5分钟内将单张插画转为分层PSD文件

终极AI图层分离指南:如何5分钟内将单张插画转为分层PSD文件 【免费下载链接】layerdivider A tool to divide a single illustration into a layered structure. 项目地址: https://gitcode.com/gh_mirrors/la/layerdivider 你是否曾经面对复杂的插画设计&am…...

ClawGuard Web:构建AI技能安全扫描平台,从代码安全到信任生态

1. 项目概述:ClawGuard Web 安全技能注册平台如果你在 OpenClaw 生态里开发或使用技能,那你肯定遇到过这个头疼的问题:从 ClawHub 或者 GitHub 上找到一个看起来不错的技能,但心里总犯嘀咕——这代码里会不会藏着恶意后门&#xf…...

SAP 利润中心(Profit Center, PCA)深度解析:定义、核算、数据归集与实例

SAP 利润中心(Profit Center, PCA)深度解析:定义、核算、数据归集与实例利润中心是 SAP 管理会计(CO-PCA) 核心组织单元,是面向内部经营考核的虚拟核算主体,可独立计算收入、成本、费用与利润&a…...

SAP S/4HANA 利润中心(PCA)完整配置步骤

SAP S/4HANA 利润中心(PCA)完整配置步骤按项目上线标准顺序一步步来,从零到可用,含前台 后台、必配 可选,通俗易懂不绕弯路一、前期基础前提(必须先做好)公司代码、控制范围已创建控制范围与公…...

Oracle EBS 的财务核算是以「Ledger(帐套)」为核心,绑定 COA、本位币、日历、核算方法,再配 OU(业务实体)、LE(法人);

Oracle EBS 的财务核算是以「Ledger(帐套)」为核心,绑定 COA、本位币、日历、核算方法,再配 OU(业务实体)、LE(法人);而 SAP FICO 是「FI(财务会计&#xff0…...

免费LLM API集成实战:从选型到构建高可用AI服务

1. 项目概述:一个汇聚免费LLM API的宝藏仓库如果你正在开发一个需要AI对话、文本生成或代码补全功能的应用,但又被高昂的API调用费用或复杂的申请流程劝退,那么你很可能需要这个项目。Clovenhoofed-loadingarea139/awesome-free-llm-apis是一…...

QMCDecode终极指南:如何快速解锁QQ音乐加密文件实现跨设备播放

QMCDecode终极指南:如何快速解锁QQ音乐加密文件实现跨设备播放 【免费下载链接】QMCDecode QQ音乐QMC格式转换为普通格式(qmcflac转flac,qmc0,qmc3转mp3, mflac,mflac0等转flac),仅支持macOS,可自动识别到QQ音乐下载目录&#xff…...

3个步骤解决经典游戏无法联网:IPXWrapper终极兼容方案

3个步骤解决经典游戏无法联网:IPXWrapper终极兼容方案 【免费下载链接】ipxwrapper 项目地址: https://gitcode.com/gh_mirrors/ip/ipxwrapper 你是否曾在Windows 10或11系统上试图重温《红色警戒2》、《帝国时代》或《星际争霸》的局域网对战,却…...

3个简单步骤彻底解决Dell G15笔记本散热问题:开源温度控制中心完全指南

3个简单步骤彻底解决Dell G15笔记本散热问题:开源温度控制中心完全指南 【免费下载链接】tcc-g15 Thermal Control Center for Dell G15 - open source alternative to AWCC 项目地址: https://gitcode.com/gh_mirrors/tc/tcc-g15 你是否正在为Dell G15笔记本…...

Cursor AI 编辑器一键配置指南:从零搭建高效编程工作站

1. 项目概述:一个为 Cursor 编辑器量身定制的“开箱即用”向导如果你是一名开发者,最近肯定没少听人提起 Cursor 这款编辑器。它基于 VS Code,但深度集成了 AI 能力,号称能理解你的代码上下文,帮你写代码、改 Bug、甚至…...

【WPF可视化设计】突破性企业级XAML设计框架,实现3倍开发效率提升

【WPF可视化设计】突破性企业级XAML设计框架,实现3倍开发效率提升 【免费下载链接】WpfDesigner The WPF Designer from SharpDevelop 项目地址: https://gitcode.com/gh_mirrors/wp/WpfDesigner 面对WPF应用开发中XAML代码编写繁琐、布局调试耗时、团队协作…...

NEO-M9L-20A,支持四系统并发与3D汽车航位推算(ADR)的GNSS模块

简介今天我要向大家介绍的是 u-blox 的模块——NEO-M9L-20A。这是一款基于 u-blox M9 平台的汽车级(AEC-Q104)标准精度GNSS接收模块,专为需要高精度、高可靠性定位的汽车和工业追踪应用而生(如导航、车联网和无人机)。该模块集成了3D惯性测量…...

为AI编程助手设置安全规则:从原理到实践的工程指南

1. 项目概述:为你的AI编程伙伴戴上“紧箍咒”如果你和我一样,深度使用Cursor这类AI编程助手,那你一定体验过那种“冰火两重天”的感觉。一方面,它能以惊人的速度生成代码、重构函数、甚至解释复杂逻辑,极大地提升了开发…...

关于python

1.python的主要运用Python的主要应用领域Python作为一种通用编程语言,因其简洁、易读和强大的生态系统,被广泛应用于多个领域。以下是Python的主要应用场景:数据科学与机器学习Python在数据分析和机器学习领域占据主导地位。库如NumPy、Panda…...

拆解、对比与优化:LLM工具智能体的五种任务规划与执行模式

大语言模型(LLM)驱动的 AI 智能体,特别是在借助Tools(工具)来完成复杂任务执行的过程中展现出了巨大的潜力。然而,让智能体能够合理规划任务步骤与执行、避免盲目行动是确保其高效可靠完成目标的关键。本篇…...

微信社交圈净化实战:如何识别并清理单向好友关系

微信社交圈净化实战:如何识别并清理单向好友关系 【免费下载链接】WechatRealFriends 微信好友关系一键检测,基于微信ipad协议,看看有没有朋友偷偷删掉或者拉黑你 项目地址: https://gitcode.com/gh_mirrors/we/WechatRealFriends 你是…...