rust 解决ssl 报错的问题

摘要: 在使用rust 调用apple push notify servie (apns )的时候, 需要加载apple 提供的.p12的一个证书。这个证书的格式有点老,新的openssl 不再支持,会报错,需要打开“legacy”的能力才能支持 报错信息类似 digital envelope routin 阅读全文
posted @ 2024-04-12 15:01 cococooder 阅读(87) 评论(0) 推荐(0) 编辑

解决spring gateway 在globalFilter 中改写response后前端接到的数据不完整问题

摘要: 表现情况 1. 前端请求后不响应 2. 前端接到的数据不完整 是因为修改返回体后没修改header 中的content-length. 设置成正确的content-length 就可以了 response.getHeaders().setContentLength(bodyStr.getBytes( 阅读全文
posted @ 2023-11-23 16:38 cococooder 阅读(118) 评论(0) 推荐(0) 编辑

Spring Gateway 同时拦截输入输出做日志操作

摘要: Spring Gateway 同时拦截输入输出做日志操作,包括request body, 和response body 主要靠代理模式,参考 https://stackoverflow.com/questions/47182961/copy-of-the-request-response-body- 阅读全文
posted @ 2023-11-10 17:36 cococooder 阅读(81) 评论(0) 推荐(0) 编辑

纯java项目maven 打可执行包

摘要: <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>3.5.0</version> <configuration> <descriptorRefs> <descriptorRef>jar 阅读全文
posted @ 2023-05-09 13:44 cococooder 阅读(18) 评论(0) 推荐(0) 编辑

Unable to find GatewayFilterFactory with name CircuitBreaker

摘要: 起因 要在springCloudGateway中整合CircuitBreaker。 按照官网 https://cloud.spring.io/spring-cloud-gateway/reference/html/#spring-cloud-circuitbreaker-filter-factory 阅读全文
posted @ 2023-05-08 15:40 cococooder 阅读(341) 评论(0) 推荐(0) 编辑

ubuntu 22.04安装postgresql

摘要: 安装 sudo apt install postgresql 修改/etc/postgresql/14/main/postgresql.conf把 listen_addresses = '127.0.0.1'修改为 listen_addresses = '*' /etc/postgresql/14/ 阅读全文
posted @ 2023-04-20 09:25 cococooder 阅读(135) 评论(0) 推荐(0) 编辑

mongodb基本操作

摘要: 1. 创建库 说明,mongodb没有创建库的功能,只要use 'dbname' 就声明了一个库,但是show dbs 的时候并不显示。在插入一条记录后,再用show dbs。这个时候库才真正建立. 参考 https://www.mongodb.com/basics/create-database 阅读全文
posted @ 2023-04-19 16:11 cococooder 阅读(20) 评论(0) 推荐(0) 编辑

ubuntu 安装 mongodb

摘要: 安装 sudo apt-get install gnupg curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \ sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \ --dearmor 阅读全文
posted @ 2023-04-19 14:32 cococooder 阅读(29) 评论(1) 推荐(1) 编辑

基于yolov8的人物及安全帽检测

摘要: http://www.linjubuluo.com/ 目前模型还在持续训练中,不是很准确。欢迎指导,试用 阅读全文
posted @ 2023-04-11 09:41 cococooder 阅读(187) 评论(0) 推荐(0) 编辑

java maven 项目java代码中的中文乱码,数据库中的返回中文不乱码

摘要: 现象 在本地跑起来项目没有问题,但是在线上打包上线后,java代码中的中文,如异常信息,enum等会乱码,而数据库中的数据读写都没有问题。指定file.encoding无效 原因 在maven编译的时候,没有指定编码导致,在本地,maven 打包走的平台编码是GBK,而在线上,用的zadig打包,走 阅读全文
posted @ 2023-03-14 08:48 cococooder 阅读(86) 评论(0) 推荐(0) 编辑