spring-ai-alibaba官方 Playground 示例

1、Spring AI Alibaba 官方社区开发了一个包含完整 “前端UI+后端实现” 的智能体 Playground 示例,示例使用 Spring AI Alibaba 开发,可以体验聊天机器人、多轮对话、图片生成、多模态、工具调用、MCP集成、RAG知识库等所有框架核心能力。

2、界面

3、准备工作 jdk17  ,

阿里云百炼api-key 对应环境变量 AI_DASHSCOPE_API_KEY

百度云翻译 ak 对应环境变量 BAIDU_TRANSLATE_APP_ID

百度云翻译sk对应环境变量 BAIDU_TRANSLATE_SECRET_KEY

百度云地图ak对应环境变量  BAIDU_MAP_API_KEY

阿里云信息查询服务iqs-search api-key对应环境变量 IQS_SEARCH_API_KEY

4、pom文件内容

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><artifactId>spring-ai-alibaba-playground</artifactId><groupId>com.alibaba.cloud.ai</groupId><version>0.0.1</version><description>Spring AI Alibaba Playground</description><name>Spring AI Alibaba Playground</name><properties><spring-boot.version>3.4.0</spring-boot.version><spring-ai.version>1.0.0</spring-ai.version><spring-ai-alibaba.version>1.0.0.2</spring-ai-alibaba.version><!-- Node and npm --><node.version>v20.12.2</node.version><npm.version>10.9.2</npm.version><!-- For playground frontend resource. dist has been placed in the resource directory,if you have the problem of secondary development or local front-end project failure to start,please set this development to true, and run the "mvn clean package" to repackage the front-end project.If you don't modify this configuration, you can compile the frontend andcopy the frontend resources by executing "mvn clean package -Dnpm.build.skip=false". --><npm.build.skip>true</npm.build.skip><zipkin.version>3.4.3</zipkin.version><micrometr.version>1.5.0-M2</micrometr.version><jackson.version>2.15.0</jackson.version><hibernate.version>6.6.9.Final</hibernate.version><sqlite-jdbc.version>3.49.1.0</sqlite-jdbc.version><knife4j.version>4.6.0</knife4j.version><javacv-platform.version>1.5.9</javacv-platform.version><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>1.5.18</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-core</artifactId><version>1.5.18</version></dependency><!-- Spring Boot Starter --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><exclusions><exclusion><artifactId>logback-classic</artifactId><groupId>ch.qos.logback</groupId></exclusion><exclusion><artifactId>logback-core</artifactId><groupId>ch.qos.logback</groupId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-webflux</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-validation</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-aop</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-jpa</artifactId></dependency><!-- Spring AI --><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-tika-document-reader</artifactId><version>${spring-ai.version}</version></dependency><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-starter-mcp-client</artifactId><version>${spring-ai.version}</version></dependency><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-autoconfigure-mcp-client</artifactId><version>${spring-ai.version}</version></dependency><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-starter-model-openai</artifactId><version>${spring-ai.version}</version></dependency><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-markdown-document-reader</artifactId><version>${spring-ai.version}</version></dependency><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-advisors-vector-store</artifactId><version>${spring-ai.version}</version></dependency><!-- Spring AI Alibaba --><dependency><groupId>com.alibaba.cloud.ai</groupId><artifactId>spring-ai-alibaba-starter-dashscope</artifactId><version>${spring-ai-alibaba.version}</version></dependency><dependency><groupId>com.alibaba.cloud.ai</groupId><artifactId>spring-ai-alibaba-starter-memory</artifactId><version>${spring-ai-alibaba.version}</version></dependency><dependency><groupId>com.alibaba.cloud.ai</groupId><artifactId>spring-ai-alibaba-starter-store-analyticdb</artifactId><version>${spring-ai-alibaba.version}</version></dependency><!-- Swagger API Docs --><dependency><groupId>com.github.xingfudeshi</groupId><artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId><version>${knife4j.version}</version></dependency><!--DB --><dependency><groupId>org.xerial</groupId><artifactId>sqlite-jdbc</artifactId><version>${sqlite-jdbc.version}</version></dependency><dependency><groupId>org.hibernate.orm</groupId><artifactId>hibernate-community-dialects</artifactId><version>${hibernate.version}</version></dependency><!-- Observable --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency><dependency><groupId>io.micrometer</groupId><artifactId>micrometer-tracing-bridge-brave</artifactId><version>${micrometr.version}</version><exclusions><exclusion><artifactId>slf4j-api</artifactId><groupId>org.slf4j</groupId></exclusion></exclusions></dependency><dependency><groupId>io.zipkin.reporter2</groupId><artifactId>zipkin-reporter-brave</artifactId><version>${zipkin.version}</version></dependency><!-- Others --><dependency><groupId>com.fasterxml.jackson.dataformat</groupId><artifactId>jackson-dataformat-yaml</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>org.bytedeco</groupId><artifactId>javacv-platform</artifactId><version>${javacv-platform.version}</version></dependency><dependency><groupId>com.google.guava</groupId><artifactId>guava</artifactId><version>33.4.0-jre</version></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${spring-boot.version}</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>com.alibaba.cloud.ai</groupId><artifactId>spring-ai-alibaba-bom</artifactId><version>${spring-ai-alibaba.version}</version><type>pom</type><scope>import</scope></dependency><dependency><groupId>org.springframework.ai</groupId><artifactId>spring-ai-bom</artifactId><version>${spring-ai.version}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><finalName>app</finalName><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-deploy-plugin</artifactId><version>${maven-deploy-plugin.version}</version></plugin><plugin><groupId>com.github.eirslett</groupId><artifactId>frontend-maven-plugin</artifactId><version>1.11.0</version><executions><execution><id>install node and pnpm</id><goals><goal>install-node-and-npm</goal></goals><configuration><skip>${npm.build.skip}</skip><nodeVersion>${node.version}</nodeVersion><npmVersion>${npm.version}</npmVersion><workingDirectory>ui</workingDirectory></configuration></execution><execution><id>install pnpm</id><goals><goal>npm</goal></goals><configuration><skip>${npm.build.skip}</skip><arguments>install -g pnpm</arguments><workingDirectory>ui</workingDirectory></configuration></execution><execution><id>pnpm install</id><goals><goal>npm</goal></goals><configuration><skip>${npm.build.skip}</skip><arguments>exec -- pnpm install</arguments><workingDirectory>ui</workingDirectory></configuration></execution><execution><id>pnpm build</id><goals><goal>npm</goal></goals><phase>generate-resources</phase><configuration><skip>${npm.build.skip}</skip><arguments>exec -- pnpm build</arguments><workingDirectory>ui</workingDirectory></configuration></execution></executions></plugin><plugin><artifactId>maven-resources-plugin</artifactId><version>3.2.0</version><executions><!-- Copy frontend dist resource to static dir --><execution><id>copy-react-build</id><phase>process-resources</phase><goals><goal>copy-resources</goal></goals><configuration><skip>${npm.build.skip}</skip><outputDirectory>${project.build.outputDirectory}/static</outputDirectory><resources><resource><directory>ui/dist</directory><filtering>false</filtering></resource></resources></configuration></execution><!-- Add new execution to copy mcp-lib directory --><execution><id>copy-mcp-lib</id><phase>prepare-package</phase><goals><goal>copy-resources</goal></goals><configuration><outputDirectory>${project.build.directory}/mcp-libs</outputDirectory><resources><resource><directory>${project.basedir}/mcp-libs</directory><filtering>false</filtering></resource></resources></configuration></execution><!-- Add new execution to copy db directory --><execution><id>copy-db</id><phase>prepare-package</phase><goals><goal>copy-resources</goal></goals><configuration><outputDirectory>${project.build.directory}/db</outputDirectory><resources><resource><directory>${project.basedir}/db</directory><filtering>false</filtering></resource></resources></configuration></execution></executions></plugin></plugins></build><repositories><repository><id>spring-milestones</id><name>Spring Milestones</name><url>https://repo.spring.io/milestone</url><snapshots><enabled>false</enabled></snapshots></repository><repository><id>aliyunmaven</id><name>aliyun</name><url>https://maven.aliyun.com/repository/public</url></repository></repositories></project>

 5、rag向量库代码解析

/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements.  See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to You under the Apache License, Version 2.0* (the "License"); you may not use this file except in compliance with* the License.  You may obtain a copy of the License at**     http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/
package com.alibaba.cloud.ai.application.config.rag;import org.springframework.ai.embedding.EmbeddingModel;
import org.springframework.ai.vectorstore.SimpleVectorStore;
import org.springframework.ai.vectorstore.VectorStore;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;@Configuration
public class SimpleVectorStoreConfiguration {@BeanCommandLineRunner ingestTermOfServiceToVectorStore(VectorStoreDelegate vectorStoreDelegate) {//return args -> {String type = System.getenv("VECTOR_STORE_TYPE");//通过环境变量 VECTOR_STORE_TYPE 判断使用analyticdb向量库还是使用基于内存的向量库VectorStoreInitializer initializer = new VectorStoreInitializer();//初始化数据到向量库initializer.init(vectorStoreDelegate.getVectorStore(type));};}/*** 提供基于内存的向量存储(SimpleVectorStore)* <p>* 依赖 EmbeddingModel(自动注入,Alibaba 的嵌入模型)* @param embeddingModel* @return*/@Beanpublic VectorStore simpleVectorStore(EmbeddingModel embeddingModel) {// 向量存储的简单实现,非常适合用于教育目的return SimpleVectorStore.builder(embeddingModel).build();}@Beanpublic VectorStoreDelegate vectorStoreDelegate(@Qualifier("simpleVectorStore") VectorStore simpleVectorStore,@Qualifier("analyticdbVectorStore") @Autowired(required = false) VectorStore analyticdbVectorStore) {//注入基于内存的向量库和 analyticdbreturn new VectorStoreDelegate(simpleVectorStore, analyticdbVectorStore);}}

/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements.  See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to You under the Apache License, Version 2.0* (the "License"); you may not use this file except in compliance with* the License.  You may obtain a copy of the License at**     http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/
package com.alibaba.cloud.ai.application.config.rag;import java.util.Objects;import org.springframework.ai.vectorstore.VectorStore;public class VectorStoreDelegate {private VectorStore simpleVectorStore;private VectorStore analyticdbVectorStore;public VectorStoreDelegate(VectorStore simpleVectorStore, VectorStore analyticdbVectorStore) {this.simpleVectorStore = simpleVectorStore;this.analyticdbVectorStore = analyticdbVectorStore;}public VectorStore getVectorStore(String vectorStoreType) {if (Objects.equals(vectorStoreType, "analyticdb") && analyticdbVectorStore != null) {return analyticdbVectorStore;}return simpleVectorStore;}
}

/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements.  See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to You under the Apache License, Version 2.0* (the "License"); you may not use this file except in compliance with* the License.  You may obtain a copy of the License at**     http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/package com.alibaba.cloud.ai.application.config.rag;import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;import org.slf4j.Logger;
import org.slf4j.LoggerFactory;import org.springframework.ai.document.Document;
import org.springframework.ai.reader.markdown.MarkdownDocumentReader;
import org.springframework.ai.transformer.splitter.TokenTextSplitter;
import org.springframework.ai.vectorstore.VectorStore;/*** @author yuluo* @author <a href="mailto:yuluo08290126@gmail.com">yuluo</a>*/
public class VectorStoreInitializer {private final Logger logger = LoggerFactory.getLogger(VectorStoreInitializer.class);public void init(VectorStore vectorStore) throws Exception {//初始化数据至向量库//读取markdown文件List<MarkdownDocumentReader> markdownDocumentReaderList = loadMarkdownDocuments();int size = 0;if (markdownDocumentReaderList.isEmpty()) {logger.warn("No markdown documents found in the directory.");return;}logger.debug("Start to load markdown documents into vector store......");for (MarkdownDocumentReader markdownDocumentReader : markdownDocumentReaderList) {
//			TokenTextSplitter是TextSplitter它使用 CL100K_BASE 编码根据Tokens计数将文本拆分为块
//
//			defaultChunkSize:每个文本块的目标大小(以 tokens 为单位)(默认值:800)。
//
//			minChunkSizeChars:每个文本块的最小大小(以字符为单位)(默认值:350)。
//
//			minChunkLengthToEmbed:要包含的 chunk 的最小长度(默认值:5)。
//
//			maxNumChunks:从文本生成的最大块数(默认值:10000)。
//
//			keepSeparator:是否在块中保留分隔符(如换行符)(默认:true)。List<Document> documents = new TokenTextSplitter(2000, 1024, 10, 10000, true).transform(markdownDocumentReader.get());size += documents.size();// 拆分 documents 列表为最大 20 个元素的子列表  也就是每次最多向向量库中添加20条数据for (int i = 0; i < documents.size(); i += 20) {int end = Math.min(i + 20, documents.size());List<Document> subList = documents.subList(i, end);vectorStore.add(subList);}}logger.debug("Load markdown documents into vector store successfully. Load {} documents.", size);}private List<MarkdownDocumentReader> loadMarkdownDocuments() throws IOException, URISyntaxException {List<MarkdownDocumentReader> readers;// 首先检查jar包当前运行目录是否存在markdown文件Path currentDirPath = Paths.get(System.getProperty("user.dir"), "rag", "markdown");if (Files.exists(currentDirPath) && Files.isDirectory(currentDirPath)) {logger.debug("Found markdown directory in current running directory: {}", currentDirPath);try (Stream<Path> paths = Files.walk(currentDirPath)) {List<Path> markdownFiles = paths.filter(Files::isRegularFile).filter(path -> path.toString().endsWith(".md")).collect(Collectors.toList());if (!markdownFiles.isEmpty()) {logger.debug("Loading {} markdown files from current directory", markdownFiles.size());readers = markdownFiles.stream().map(path -> {String filePath = path.toAbsolutePath().toString();return new MarkdownDocumentReader("file:" + filePath);}).collect(Collectors.toList());return readers;} else {logger.debug("No markdown files found in current directory, falling back to resources");}}} else {logger.debug("Markdown directory not found in current directory, falling back to resources");}// 如果当前运行目录没有找到,则从resources目录加载Path markdownDir = Paths.get(getClass().getClassLoader().getResource("rag/markdown").toURI());logger.debug("Loading markdown files from resources directory: {}", markdownDir);try (Stream<Path> paths = Files.walk(markdownDir)) {readers = paths.filter(Files::isRegularFile).filter(path -> path.toString().endsWith(".md")).map(path -> {String fileName = path.getFileName().toString();String classpathPath = "classpath:rag/markdown/" + fileName;return new MarkdownDocumentReader(classpathPath);}).collect(Collectors.toList());}return readers;}}

6、源代码地址

https://github.com/springaialibaba/spring-ai-alibaba-examples

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/pingmian/87400.shtml
繁体地址,请注明出处:http://hk.pswp.cn/pingmian/87400.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

k8s pod深度理解

一、理论 pod等同于逻辑主机&#xff0c;在它上面运行各种程序&#xff08;容器&#xff09; pod的pause容器作用&#xff0c;pod网络、存储 所有容器的父容器&#xff0c;负责回收僵尸容器&#xff0c;同时它为pod中的容器提供了统一的网络及统一的共享存储。 pod的endpoint…

Android Auto即将带来变革

在2025年谷歌I/O开发者大会上&#xff0c;Android Auto迎来重磅升级。除了集成Gemini智能助手外&#xff0c;本次更新还突破性地为车载信息娱乐系统新增了浏览器和视频应用支持。值得注意的是&#xff0c;Spotify应用也将获得一系列创新功能&#xff0c;进一步丰富用户的驾驶体…

Jenkins 与 GitLab CI/CD 的核心对比

Jenkins 与 GitLab CI/CD 的核心对比及中小企业选型建议如下&#xff1a; &#x1f504; ‌核心功能对比‌ ‌维度‌‌Jenkins‌‌GitLab CI/CD‌‌集成性‌需手动配置插件对接代码仓库&#xff08;如 GitLab&#xff09;原生深度集成 GitLab 仓库&#xff0c;实现代码-CI/CD …

每日问题总结

fairy GUI适配相关问题 为什么自己适配好了但是打包发布到unity没有UI显示呢&#xff1f; 原因可能是你发布的组件和图片不在同一个包下面&#xff0c;因为fairyGUI的分包限制问题&#xff0c;每一个包限制在2048M大小。不能超过这个大小&#xff0c;所以说&#xff0c;有可能…

embbding you should know

embedding&#xff1a;就是将词向量或者图向量 采用权重升维度&#xff0c;更好的去表达这个特征&#xff1b;nn.Embedding 是 PyTorch 中的 查表式嵌入层&#xff08;lookup‐table&#xff09;&#xff0c;用于将离散的整数索引&#xff08;如词 ID、实体 ID、离散特征类别等…

【JS-6.2-模板字符串】ES6 模板字符串:现代JavaScript的字符串处理利器

在ES6(ECMAScript 2015)引入的所有新特性中&#xff0c;模板字符串(Template Literals)可能是最直观、最容易被开发者接受并广泛使用的特性之一。它彻底改变了我们在JavaScript中处理字符串的方式&#xff0c;提供了更强大、更灵活的字符串操作能力。本文将深入探讨模板字符串的…

百度捂紧“钱袋子”

何俊杰依然是李彦宏手里最能用、也最信得过的人之一。 作者|景行 编辑|文昌龙 李彦宏的OKR又兑现了一条。年初他在组织建设的OKR里放话“组织负责人进一步年轻化&#xff0c;提倡赛马”&#xff0c;如今“赛马”跑来了百度新CFO。 7月1日&#xff0c;李彦宏发全员邮件&#…

刷卡登入数据获取

1.WPF刷卡登入数据获取&#xff0c;防止用户手动输入 //WPF输入框信息及触发命令<StackPanel Orientation"Vertical" VerticalAlignment"Center" Margin"0 30" Visibility"{Binding LoginMode,Converter{StaticResource loginModeWit…

DPO训练中的logit scale 与 reward shift 偏置问题以及可能的解决方案

Logit Scale Bias&#xff08;Logit 放缩偏置&#xff09; 定义&#xff1a; Logit scale 偏置指的是&#xff0c;不同模型&#xff08;如 Actor 与 Reference&#xff09;之间输出的 logit 的数量级&#xff08;scale&#xff09;不一致&#xff0c;导致 log-prob 或 log-rati…

再见 RAG?Gemini 2.0 Flash 刚刚 “杀死” 了它!

最近谷歌发布了 Gemini 2.0 Flash&#xff0c;说实话&#xff0c;它可能是目前市面上性价比最高的 AI 模型了。 许多人写过关于 RAG 可能不再需要的文章&#xff0c;也可以看到人们在讨论它。有些人理解&#xff0c;有些人不理解&#xff0c;还有些人非常担心。 所以让我们解…

PDF的图片文字识别工具

PDF的图片文字识别工具是一款完全免费的PDF OCR识别软件&#xff0c;软件支持“单文件选择、多文件批量选择、文字预处理、结果后处理、Word导出”等功能。 选择你想要识别的PDF&#xff0c;软件就自动的开始识别PDF内容&#xff0c;识别后的文字在软件的下方有内容预览。 注意…

SQLite不够用?视频汇聚系统EasyCVR切换MySQL数据库的关键参数怎么调?

一、为什么需要将EasyCVR从SQLite切换到MySQL&#xff1f; EasyCVR默认使用的SQLite数据库属于轻量级嵌入式数据库&#xff0c;适合小型项目或设备量较少的场景&#xff08;通常建议设备通道数≤200&#xff09;。当设备通道数超过200或需要支持高并发访问、海量数据存储时&am…

【AI成长会】ubuntu 安装运行rust

在Ubuntu上用Rust编写第一个程序 从你的输出可以看出&#xff0c;Rust已经成功安装在你的Ubuntu系统上了。现在我们来编写并运行第一个Rust程序&#xff0c;整个过程需要几个简单的步骤&#xff1a; 一、配置Shell环境&#xff08;如果需要&#xff09; 虽然安装提示可能需要…

两个手机都用同个wifi,IP地址会一样吗?如何更改ip地址

会的。两个手机连接同一个 WiFi 路由器&#xff0c;它们的 IP 地址通常一样的。 一、原因如下&#xff1a; 你看到的 IP 地址有两种&#xff1a; 内网 IP 地址&#xff08;局域网 IP&#xff09;&#xff1a; 这是路由器分配给你手机在家庭或办公室内部网络使用的地址。通常格…

十六、windows系统安全-----账号克隆和隐藏

环境 windows server 2012 步骤 1.查看当前用户账号cmd 命令net user&#xff0c;或在计算机管理界面查看 2.查看具体用户信息 net user 用户名 3.新建隐藏用户 net user shiyan$ qwe123 /add **4.添加用户组 net localgroup administrators shiyan$ /add**将刚才创建的隐藏…

【安全有效新方案】WSL 默认路径迁移实战:通过 PowerShell 符号链接实现自动重定向

WSL 默认路径迁移实战&#xff1a;通过 PowerShell 符号链接实现自动重定向 在使用 WSL&#xff08;Windows Subsystem for Linux&#xff09;的过程中&#xff0c;许多用户会遇到 C 盘空间被 WSL 发行版不断占用的问题。这是因为 WSL 默认将发行版存储在C:\Users\<用户名&…

使用DDR4控制器实现多通道数据读写(十八)

一、 概述 在之前已经使用interconnect IP 实现了DDR4的多通道读写功能&#xff0c;接下来为了更能接近实用性和更直观的展现多通道读写的功能&#xff0c;使用DDS IP 核生成两组正弦波信号&#xff0c;将两组正弦波信号通过其中两个通道存储到DDR4中&#xff0c;再使用另外两个…

基于Vue.js + Node.js + MySQL实现的图书销售管理系统

图书销售管理系统 项目概述 图书销售管理系统是一个基于Vue.js Node.js MySQL的全栈Web应用程序&#xff0c;专为数据库课程设计而开发。该系统实现了完整的图书销售业务流程管理&#xff0c;包括图书信息管理、库存管理、采购管理、销售管理和统计分析等功能模块。 项目背…

工业路由器赋能智慧电力储能柜实时通讯,构建电力智能化新生态

在电力行业迈向智能化的进程中&#xff0c;智慧电力储能柜作为实现电力灵活调配与高效存储的关键设施&#xff0c;其重要性日益凸显。然而复杂多变的应用环境、多样的设备接入需求、严苛的数据传输要求以及严峻的网络安全威胁&#xff0c;给储能柜的实时通讯带来诸多挑战。工业…

命令模式 - Flutter中的操作封装大师,把“动作“变成可管理的对象!

痛点场景&#xff1a;绘图应用的操作管理 假设你在开发一个绘图App&#xff0c;需要支持&#xff1a; 添加/删除图形修改图形属性撤销/重做操作批量执行命令 传统实现方式&#xff1a; void _handleAddShape(ShapeType type) {final shape _createShape(type);setState(()…