Spring Boot从application.yml中读取变量

昨天发现用NodeJS写的文件上传服务有严重的内存泄漏问题 …

application.yml

application.yml的根节点添加以下内容:

my-config:
upload-real-path: /Users/net.cctv3.i/Desktop
upload-cdn-path: https://cloud.cctv3.net/
environment: Development
阅读更多

HBuilderX 开发 uni-app 无法唤醒微信小程序开发工具

哎,又开始赶鸭子上架了 😌 …

uni-app搞什么飞机 😡 …

08:54:42.318 [微信小程序开发者工具] [error] IDE service port disabled. To use CLI Call, please enter y to confirm enabling CLI capability, or manually open IDE -> Settings -> Security Settings, and set Service Port On.
08:54:42.322 [微信小程序开发者工具] For more details see: https://developers.weixin.qq.com/miniprogram/en/dev/devtools/cli.html
08:54:42.325 [微信小程序开发者工具] [error] 工具的服务端口已关闭。要使用命令行调用工具,请在下方输入 y 以确认开启,或手动打开工具 -> 设置 -> 安全设置,将服务端口开启。
08:54:42.331 [微信小程序开发者工具] 详细信息: https://developers.weixin.qq.com/miniprogram/dev/devtools/cli.html
08:54:42.337 [微信小程序开发者工具]
08:54:42.337 [微信小程序开发者工具]
08:54:42.340 [微信小程序开发者工具] ? Enable IDE Service (y/N) 

阅读更多

CSS 鼠标悬停修改 src 图片

我不想写CSS,不想写CSS,不想写CSS 😡…

自从公司内部转岗,就开始了移动端转 Web 端的不归之路 …
需求要悬停的时候,把置灰的问号改成彩色问号,同时给个提示 …

  • 悬停前

Snipaste 2024 02 18 16 26 02

  • 悬停后

Snipaste 2024 02 18 16 25 35

阅读更多

Not authorized on admin to execute command

NextJS使用mongoose连接数据库的时候报错 …

MongoServerError: Authentication failed.
at Connection.onMessage (/Users/net.cctv3.i/chnqoo-recollections-service/node_modules/mongodb/lib/cmap/connection.js:205:26)
at MessageStream.<anonymous> (/Users/net.cctv3.i/chnqoo-recollections-service/node_modules/mongodb/lib/cmap/connection.js:64:60)
at MessageStream.emit (node:events:518:28)
at processIncomingData (/Users/net.cctv3.i/chnqoo-recollections-service/node_modules/mongodb/lib/cmap/message_stream.js:117:16)
at MessageStream._write (/Users/net.cctv3.i/chnqoo-recollections-service/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:564:12)
at _write (node:internal/streams/writable:493:10)
at Writable.write (node:internal/streams/writable:502:10)
at Socket.ondata (node:internal/streams/readable:1007:22)
at Socket.emit (node:events:518:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
ok: 0,
code: 18,
codeName: 'AuthenticationFailed',
connectionGeneration: 0,
[Symbol(errorLabels)]: Set(2) { 'HandshakeError', 'ResetPool' }
}
阅读更多

react-native-config 配置多包名&多环境 APKs 共存

以前都是准备几台不同的 android 手机安装不同环境的包,如果想一个手机安装不同环境的包,只能删了重新打然后重新安装。
解决问题的根本原因是,构建不同环境的包,假设我有三个环境

- Staging -> .env.Staging -> com.duolegamehelper.staging
- Alpha -> .env.alpha -> com.duolegamehelper.alpha
- Production -> .env.production -> com.duolegamehelper.production

那么我就打包的时候,通过不同的.env配置文件,动态的把包名和 APP 的名字打进去。
研究了半天,其实react-native-config是可以解决这个问题的,只不过需要修改打包的gradle脚本。

Snipaste 2024 02 11 15 10 28

阅读更多

NextJS加载不同环境的.env文件

NextJS默认加载的是.env.local,所以可以通过一个巧妙地办法,直接复制对应的文件到.env.local中,然后启动。

根目录添加不同环境的.env

➜  chnqoo-recollections-service git:(master) ✗ find . -type f -name ".env*"
./.env.production
./.env.local
./.env.alpha
./.env.staging
./.env.development
阅读更多

Error installing lottie-ios

iOS安装lottie报错:

[!] Error installing lottie-ios
[!] /usr/local/bin/git clone https://github.com/airbnb/lottie-ios.git /var/folders/s4/d4hj6wbj1_j3w4ynthv1klf80000gn/T/d20240201-9298-1c37cjq --template= --single-branch --depth 1 --branch 4.4.0

正克隆到 '/var/folders/s4/d4hj6wbj1_j3w4ynthv1klf80000gn/T/d20240201-9298-1c37cjq'...
error: RPC 失败。curl 56 Recv failure: Connection reset by peer
error: 预期仍然需要 5466 个字节的正文
fetch-pack: unexpected disconnect while reading sideband packet
fatal: 过早的文件结束符(EOF)
fatal: index-pack 失败
阅读更多