谷粒商城项目-P16快速开发-人人开源搭建后台管理系统

1.对脚手架工程进行改造

此项目选用的脚手架工程是人人开源

地址:人人开源

选择的是下图标红的renren-fast作为后端,renren-fast-vue作为前端

克隆上述两个项目

2.后端改造

2.1将renrenfast项目的git文件夹删除后,拖进后端代码文件夹中

2.2搭建基本运行环境

设置为子模块

搭建数据库

将下图所示sql代码,在sqlyog中运行,创建数据库

修改数据库相关配置文件

spring:datasource:type: com.alibaba.druid.pool.DruidDataSourcedruid:driver-class-name: com.mysql.cj.jdbc.Driverurl: jdbc:mysql://192.168.56.10:3306/gulimall_admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghaiusername: rootpassword: rootinitial-size: 10max-active: 100min-idle: 10max-wait: 60000pool-prepared-statements: truemax-pool-prepared-statement-per-connection-size: 20time-between-eviction-runs-millis: 60000min-evictable-idle-time-millis: 300000#Oracle需要打开注释#validation-query: SELECT 1 FROM DUALtest-while-idle: truetest-on-borrow: falsetest-on-return: falsestat-view-servlet:enabled: trueurl-pattern: /druid/*#login-username: admin#login-password: adminfilter:stat:log-slow-sql: trueslow-sql-millis: 1000merge-sql: falsewall:config:multi-statement-allow: true##多数据源的配置
#dynamic:
#  datasource:
#    slave1:
#      driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#      url: jdbc:sqlserver://localhost:1433;DatabaseName=renren_security
#      username: sa
#      password: 123456
#    slave2:
#      driver-class-name: org.postgresql.Driver
#      url: jdbc:postgresql://localhost:5432/renren_security
#      username: renren
#      password: 123456redis:open: false  # 是否开启redis缓存  true开启   false关闭database: 0host: localhostport: 6379password:    # 密码(默认为空)timeout: 6000ms  # 连接超时时长(毫秒)jedis:pool:max-active: 1000  # 连接池最大连接数(使用负值表示没有限制)max-wait: -1ms      # 连接池最大阻塞等待时间(使用负值表示没有限制)max-idle: 10      # 连接池中的最大空闲连接min-idle: 5       # 连接池中的最小空闲连接

2.3完成上述后端配置后,启动测试后端

如果出现下列运行结果,则运行成功

3.前端改造

3.1相关软件下载

使用vscode,直接打开renren-fast-vue,注意git文件不要忘记删除

安装node,我使用的node版本为22.12.0

配置npm使用淘宝镜像

npm config set registry http://registry.npm.taobao.org/

3.2下载前端依赖的所有组件

使用npm install进行下载

报错处理

在npm install过程中,出现下列报错情况

PS G:\code\renren\renren-fast-vue> npm install
npm warn old lockfile
npm warn old lockfile The package-lock.json file was created with an old version of npm,
npm warn old lockfile so supplemental metadata must be fetched from the registry.
npm warn old lockfile
npm warn old lockfile This is a one-time fix-up, please be patient...
npm warn old lockfile
npm warn old lockfile Could not fetch metadata for fsevents@1.2.9 Error: Integrity checksum failed when using sha512: wanted sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== but got sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==.
npm warn old lockfile     at RegistryFetcher.manifest (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\registry.js:163:35)
npm warn old lockfile     at async C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:715:24 {
npm warn old lockfile   code: 'EINTEGRITY'
npm warn old lockfile }
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: renren-fast-vue@1.2.2
npm warn Found: node-sass@4.9.0
npm warn node_modules/node-sass
npm warn   node-sass@"^6.0.1" from the root project
npm warn   1 more (sass-loader)
npm warn
npm warn Could not resolve dependency:
npm warn peer node-sass@"^4.0.0" from sass-loader@6.0.6
npm warn node_modules/sass-loader
npm warn   sass-loader@"6.0.6" from the root project
npm warn deprecated npmlog@4.1.2: This package is no longer supported.
npm warn deprecated lodash.template@4.5.0: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm warn deprecated set-value@2.0.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm warn deprecated rimraf@2.6.0: Rimraf versions prior to v4 are no longer supported
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated source-map-url@0.4.0: See https://github.com/lydell/source-map-url#deprecated
npm warn deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm warn deprecated gauge@2.7.4: This package is no longer supported.
npm warn deprecated q@1.5.1: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.
npm warn deprecated
npm warn deprecated (For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
npm warn deprecated mixin-deep@1.3.1: Critical bug fixed in v2.0.1, please upgrade to the latest version.
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated move-concurrently@1.0.1: This package is no longer supported.
npm warn deprecated sane@2.5.2: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm warn deprecated lodash.clone@3.0.3: This package is deprecated. Use structuredClone instead.
npm warn deprecated is-data-descriptor@0.1.4: Please upgrade to v0.1.5
npm warn deprecated json3@3.3.2: Please use the native JSON object instead of JSON 3
npm warn deprecated ini@1.3.5: Please update to ini >=1.3.6 to avoid a prototype pollution issue
npm warn deprecated is-accessor-descriptor@0.1.6: Please upgrade to v0.1.7
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated uuid@3.3.2: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated source-map-resolve@0.5.2: See https://github.com/lydell/source-map-resolve#deprecated
npm warn deprecated flatten@1.0.2: flatten is deprecated in favor of utility frameworks such as lodash.
npm warn deprecated eslint-loader@1.7.1: This loader has been deprecated. Please use eslint-webpack-plugin
npm warn deprecated html-webpack-plugin@2.30.1: out of support
npm warn deprecated content-type-parser@1.0.2: Use whatwg-mimetype instead
npm warn deprecated copy-concurrently@1.0.5: This package is no longer supported.
npm warn deprecated fs-write-stream-atomic@1.0.10: This package is no longer supported.
npm warn deprecated debug@3.2.6: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm warn deprecated extract-text-webpack-plugin@3.0.0: Deprecated. Please use https://github.com/webpack-contrib/mini-css-extract-plugin 
npm warn deprecated consolidate@0.14.5: Please upgrade to consolidate v1.0.0+ as it has been modernized with several long-awaited fixes implemented. Maintenance is supported by Forward Email at https://forwardemail.net ; follow/watch https://github.com/ladjs/consolidate for updates and release changelog
npm warn deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm warn deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm warn deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm warn deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated abab@1.0.4: Use your platform's native atob() and btoa() methods instead
npm warn deprecated glob@7.1.4: Glob versions prior to v9 are no longer supported
npm warn deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated acorn-dynamic-import@2.0.2: This is probably built in to whatever tool you're using. If you still need it... idk     
npm warn deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated chromedriver@2.27.2: Chromedriver download url has changed. Use version 114.0.2 or newer.
npm warn deprecated babel-eslint@7.1.1: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm warn deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm warn deprecated graceful-fs@2.0.3: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported
npm warn deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated uuid@2.0.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm warn deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated is-data-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated is-accessor-descriptor@1.0.0: Please upgrade to v1.0.1
npm warn deprecated rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported
npm warn deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm warn deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm warn deprecated glob@3.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm warn deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm warn deprecated mkdirp@0.5.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated mkdirp@0.3.0: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm warn deprecated uglify-es@3.3.9: support for ECMAScript is superseded by `uglify-js` as of v3.13.0
npm warn deprecated svgo@0.7.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm warn deprecated ejs@0.8.8: Critical security bugs fixed in 2.5.5
npm warn deprecated axios@0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm warn deprecated buffer@4.9.1: This version of 'buffer' is out-of-date. You must update to v4.9.2 or newer
npm warn deprecated vue@2.5.16: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.
npm warn deprecated node-sass@6.0.1: Node Sass is no longer supported. Please use `sass` or `sass-embedded` instead.
npm warn deprecated eslint@3.19.0: This version is no longer supported. Please see https://eslint.org/version-support for other options. 
npm warn deprecated core-js@2.6.5: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '\\\\?\\G:\\code\\renren\\renren-fast-vue\\node_modules',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'G:\code\renren\renren-fast-vue\node_modules\lodash'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'G:\\code\\renren\\renren-fast-vue\\node_modules\\lodash'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\?\\G:\\code\\renren\\renren-fast-vue\\node_modules\\async',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'G:\code\renren\renren-fast-vue\node_modules\async\node_modules\lodash'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'G:\\code\\renren\\renren-fast-vue\\node_modules\\async\\node_modules\\lodash'
npm warn cleanup     }
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '\\\\?\\G:\\code\\renren\\renren-fast-vue\\node_modules\\browser-resolve',
npm warn cleanup     [Error: EPERM: operation not permitted, rmdir 'G:\code\renren\renren-fast-vue\node_modules\browser-resolve\node_modules\resolve\test\resolver\bar'] {
npm warn cleanup       errno: -4048,
npm warn cleanup       code: 'EPERM',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: 'G:\\code\\renren\\renren-fast-vue\\node_modules\\browser-resolve\\node_modules\\resolve\\test\\resolver\\bar'
npm warn cleanup     }
npm warn cleanup   ]
npm warn cleanup ]
npm error code 1
npm error path G:\code\renren\renren-fast-vue\node_modules\node-sass
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm error Building: C:\Program Files\nodejs\node.exe G:\code\renren\renren-fast-vue\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm error gyp info it worked if it ends with ok
npm error gyp verb cli [
npm error gyp verb cli   'C:\\Program Files\\nodejs\\node.exe',
npm error gyp verb cli   'G:\\code\\renren\\renren-fast-vue\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm error gyp verb cli   'rebuild',
npm error gyp verb cli   '--verbose',
npm error gyp verb cli   '--libsass_ext=',
npm error gyp verb cli   '--libsass_cflags=',
npm error gyp verb cli   '--libsass_ldflags=',
npm error gyp verb cli   '--libsass_library='
npm error gyp verb cli ]
npm error gyp info using node-gyp@7.1.2
npm error gyp info using node@22.12.0 | win32 | x64
npm error gyp verb command rebuild []
npm error gyp verb command clean []
npm error gyp verb clean removing "build" directory
npm error gyp verb command configure []
npm error gyp verb find Python Python is not set from command line or npm configuration
npm error gyp verb find Python Python is not set from environment variable PYTHON
npm error gyp verb find Python checking if "python3" can be used
npm error gyp verb find Python - executing "python3" to get executable path
npm error (node:29056) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
npm error (Use `node --trace-deprecation ...` to show where the warning was created)
npm error gyp verb find Python - "python3" is not in PATH or produced an error
npm error gyp verb find Python checking if "python" can be used
npm error gyp verb find Python - executing "python" to get executable path
npm error gyp verb find Python - executable path is "C:\Python313\python.exe"
npm error gyp verb find Python - executing "C:\Python313\python.exe" to get version
npm error gyp verb find Python - version is "3.13.1"
npm error gyp info find Python using Python version 3.13.1 found at "C:\Python313\python.exe"
npm error gyp verb get node dir no --target version specified, falling back to host node version: 22.12.0
npm error gyp verb command install [ '22.12.0' ]
npm error gyp verb install input version string "22.12.0"
npm error gyp verb install installing version: 22.12.0
npm error gyp verb install --ensure was passed, so won't reinstall if already installed
npm error (node:29056) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.     
npm error gyp verb install version is already installed, need to check "installVersion"
npm error gyp verb got "installVersion" 9
npm error gyp verb needs "installVersion" 9
npm error gyp verb install version is good
npm error gyp verb get node dir target node version installed: 22.12.0
npm error gyp verb build dir attempting to create "build" dir: G:\code\renren\renren-fast-vue\node_modules\node-sass\build
npm error gyp verb build dir "build" dir needed to be created? \\?\G:\code\renren\renren-fast-vue\node_modules\node-sass\build
npm error gyp verb find VS msvs_version not set from command line or npm config
npm error gyp verb find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm error gyp verb find VS unknown version "undefined" found at "D:\software\vs2"
npm error gyp verb find VS checking VS2019 (16.11.35425.106) found at:
npm error gyp verb find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm error gyp verb find VS - found "Visual Studio C++ core features"
npm error gyp verb find VS - found VC++ toolset: v142
npm error gyp verb find VS - found Windows SDK: 10.0.19041.0
npm error gyp info find VS using VS2019 (16.11.35425.106) found at:
npm error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
npm error gyp info find VS run with --verbose for detailed information
npm error gyp verb build/config.gypi creating config file
npm error gyp ERR! UNCAUGHT EXCEPTION
npm error gyp ERR! stack TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
npm error gyp ERR! stack     at createConfigFile (G:\code\renren\renren-fast-vue\node_modules\node-gyp\lib\configure.js:117:21)
npm error gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:85:11)
npm error gyp ERR! System Windows_NT 10.0.26100
npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "G:\\code\\renren\\renren-fast-vue\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm error gyp ERR! cwd G:\code\renren\renren-fast-vue\node_modules\node-sass
npm error gyp ERR! node -v v22.12.0
npm error gyp ERR! node-gyp -v v7.1.2
npm error gyp ERR! Node-gyp failed to build your package.
npm error gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
npm error Build failed with error code: 7
npm error A complete log of this run can be found in: C:\Users\ymcfy\AppData\Local\npm-cache\_logs\2025-09-11T01_54_15_169Z-debug-0.log  
PS G:\code\renren\renren-fast-vue> 

导致这一现象的原因是node-sass模块没有下载,我尝试采用下列步骤重新安装node-sass

npm rebuild node-sass
npm uninstall node-sass

但是仍然报错,我又采取将node版本更换为v14.21.3,重新进行npm install,然后进行npm run dev,报如下错误

我采取的方案是直接下载node-sass

安装成功之后,运行npm run dev

3.3登录后效果如下:

对于前端npm install 报错的后记:

处理这个报错,花了一个小时左右时间,我总结我解决这个问题的要点有两个:

1.换node版本为14.x

2.直接安装node-sass

当然可能有我在根据某些资料解决问题时,没注意到的解决步骤,在此我把我参考的文章链接附上,这里面并不是每个文章的每个步骤对我都有用,但是都帮到了我,读我这篇文章,但是看我步骤没有解决问题的读者,可以尝试一下这些文章的办法。最后,感谢这些文章的作者:

ERROR in Cannot find module 'node-sass'(最全解决方案)-腾讯云开发者社区-腾讯云

关于人人开源renren-fast-vue 中npm install各种报错的解决方案 - 帝莘 - 博客园

(60 封私信 / 89 条消息) renren-fast-vue 项目部署以及install问题解决 - 知乎

另外还有新的npm镜像源地址,可供参考:

# 移除旧的淘宝镜像源
npm config delete registry# 设置新的阿里云 npm 镜像源(官方推荐)
npm config set registry https://registry.npmmirror.com

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

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

相关文章

V少JS基础班之第八弹:this

文章目录一、 前言二、本节涉及知识点三、重点内容1、从新的角度认识this2、this是函数的参数3、this的值4、函数的调用1- 裸函数调用2- 函数作为构造函数调用3- 函数作为对象的方法调用4- 函数显示调用5- 箭头函数一、 前言 第八弹内容是this。this相对来说难度不大&#xff…

《堆的详解:结构、操作及堆排序算法》

目录 一.堆的概念与结构 1.1 堆的概念 1.2 堆性质&#xff1a; 1.3 堆的结构定义 二.堆的初始化和销毁 2.1 堆的初始化&#xff1a; 2.2 堆的销毁&#xff1a; 三.堆的插入数据(含向上调整算法的实现) 3.1 插入逻辑 3.2 插入函数 3.3 向上调整算法 三. 堆的删除数…

深入解析 Kubernetes 中的 Service 资源:为应用提供稳定的网络访问

什么是 Kubernetes 中的 Service&#xff1f; 在现代微服务架构中&#xff0c;服务之间的通信和负载均衡是至关重要的。尤其是在 Kubernetes 环境中&#xff0c;由于 Pod 是动态创建和销毁的&#xff0c;如何为一组 Pod 提供稳定的访问入口&#xff0c;成为了架构设计中的一个关…

使用Samba网络磁盘作为MacOS时间机器的远程备份磁盘

最近考虑MacOS系统升级&#xff0c;所以需要做磁盘备份&#xff0c;MacOS里有个备份磁盘很方便的工具&#xff1a;时间机器&#xff0c;可以自动定期备份磁盘&#xff0c;但是一般需要一个大点的移动硬盘插在macbook上选择其为备份磁盘&#xff0c;可惜我并没有移动硬盘&#x…

智能头盔实时监控系统设计与实现

智能头盔实时监控系统设计与实现 源码 https://gitee.com/intostars/csdn-demo/tree/master/src/views/smartHelmet 预览 一、功能概述 智能头盔实时监控系统是基于Vue 3和TypeScript开发的一套用于远程监控和控制智能头盔设备的前端应用模块。该系统通过WebSocket与后端服务…

Docker 学习笔记(八):容器运行时工具实践及 OpenStack 部署基础

容器管理工具Containerd nerdctl 实践 nerdctl管理存储 nerdctl命令创建容器的时候&#xff0c;可以使用-v选项将本地目录挂载给容器实现数据持久化 示例&#xff1a; [rootlocalhost ~]# mkdir /data [rootlocalhost ~]# nerdctl run -d -v /data:/data busybox -- sleep infi…

Unity键盘控制角色运动

以下是一个完整的Unity角色移动和跳跃脚本,支持WASD或方向键移动: 使用说明 确保组件设置正确: 确保您的游戏对象有一个CharacterController组件 如果没有,可以通过菜单 "Component -> Physics -> Character Controller" 添加 相机设置: 确保场景中有一…

linux 宏 DEVICE_ATTR

理解 DEVICE_ATTR DEVICE_ATTR 是 Linux 内核中用于创建设备属性的宏&#xff0c;通常用于 sysfs 文件系统。通过 sysfs&#xff0c;用户空间的程序可以读取或修改内核中的设备属性。DEVICE_ATTR 宏定义在 <linux/device.h> 头文件中&#xff0c;用于声明和定义一个设备属…

MCP模型上下文协议以及交互流程

1. MCP 是什么全称&#xff1a;Model Context Protocol定位&#xff1a;让大语言模型&#xff08;LLM&#xff09;能在“上下文”之外&#xff0c;按统一格式访问外部数据、调用插件、持久化状态。动机&#xff1a;以前每家框架&#xff08;LangChain、LlamaIndex 等&#xff0…

MySQLTransactionRollbackException

问题描述mysql部署1主3从&#xff0c;昨天发现主库有大量报警错误&#xff1a;Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction ; Deadlock found when trying to get lock; …

Redis环境搭建指南:Windows/Linux/Docker多场景安装与配置

Redis环境搭建指南&#xff1a;Windows/Linux/Docker多场景安装与配置 1. Redis安装方式概览 1.1 安装方式对比 安装方式适用场景优点缺点难度Windows直接安装开发调试安装简单&#xff0c;Windows兼容好性能不如Linux&#xff0c;生产不推荐⭐Linux源码编译生产环境性能最佳…

leetcode.80删除有序数组中的重复项2

题目描述 给你一个有序数组 nums &#xff0c;请你 原地 删除重复出现的元素&#xff0c;使得出现次数超过两次的元素只出现两次 &#xff0c;返回删除后数组的新长度。 不要使用额外的数组空间&#xff0c;你必须在 原地 修改输入数组 并在使用 O(1) 额外空间的条件下完成。…

运动卡新手入门及常见问题处理

1.新手入门1.1 插卡打开包装&#xff0c;拿出PCI板卡&#xff0c;如下图&#xff1a;打开电脑机箱盖&#xff0c;找到PCI插槽&#xff0c;如下图&#xff08;红色框部分是PCI槽&#xff0c;有些主板上PCI槽是白色或其他颜色&#xff09;&#xff1a;插入板卡&#xff0c;如下图…

PRINCE2与PMP项目管理体系对比

在全球范围内&#xff0c;PRINCE2与PMP是两大最具影响力的项目管理体系。PRINCE2注重流程和治理结构&#xff0c;强调“控制”与“规范”&#xff1b;而PMP基于PMBOK指南&#xff0c;强调知识体系和方法论的全面性&#xff0c;更关注“工具”与“实践”。 不同体系的侧重点&…

在UniApp跨平台开发中实现相机自定义滤镜的链式处理架构

以下是进阶方案&#xff1a;架构核心设计分层结构$$Pipeline Capture \otimes Filter_1 \otimes Filter_2 \otimes \cdots \otimes Filter_n \otimes Render$$ 其中&#xff1a;$\otimes$ 表示链式处理操作符$Capture$ 为原始图像采集层$Filter_n$ 为可插拔滤镜单元$Render$ 为…

Mark5 穿越机电调深度解析:设计、选型、控制与实战(下)

TIM_SetCompare3 (TIM1, T0 + T1 + T2); // W+​ break;​ case 3:​ // U - 导通,V - 导通,W + 导通​ TIM_SetCompare1 (TIM1, T0); // U-​ TIM_SetCompare2 (TIM1, T0); // V-​ TIM_SetCompare3 (TIM1, T0 + T1 + T2); // W+​ break;​ case 4:​ // U - 导通…

背包问题从入门到入土

我在这里介绍4种常见的背包问题&#xff0c;这里我想按易 --> 难程度从01背包&#xff0c;完全背包&#xff0c;分组背包&#xff0c;多重背包的顺序介绍。&#xff08;封面附在最后&#xff09;一&#xff0c;01背包问题&#xff08;后面三个背包问题的基础&#xff09;01背…

Leetcode 18 java

​​​​​1​​​​​​​141. 环形链表1 题目 ​​​​​1​​​​​​​141. 环形链表 给你一个链表的头节点 head &#xff0c;判断链表中是否有环。 如果链表中有某个节点&#xff0c;可以通过连续跟踪 next 指针再次到达&#xff0c;则链表中存在环。 为了表示给定链表…

Linux 正则表达式详解(基础 + 扩展 + 实操)

Linux 正则表达式详解&#xff08;基础 扩展 实操&#xff09; 正则表达式&#xff08;Regular Expression&#xff0c;简称 RE&#xff09;是 Linux 文本处理的核心工具&#xff0c;用于定义字符匹配模式&#xff0c;配合 grep、sed、awk 等工具可实现文本过滤、查找、替换等…

Json-rpc通信项目(基于C++ Jsoncpp muduo库)

一、介绍RPC RPC&#xff08;Remote Procedure Call&#xff09;远程过程调用&#xff0c;一种通过网络从远程计算器上请求服务&#xff0c;而不需要了解底层网络通信细节&#xff0c;RPC可以使用多种网络协议进行通信&#xff0c;并且在TCP/IP网络四层模型中跨越了传输层和应…