摘要:
一,报错信息: checking for oniguruma... no configure: error: Package requirements (oniguruma) were not met: Package 'oniguruma', required by 'virtual:world' 阅读全文
posted @ 2025-02-15 11:13
刘宏缔的架构森林
阅读(375)
评论(0)
推荐(0)
摘要:
一,重置密码时的报错信息 mysql> alter user root@localhost identified by 'mypassword'; ERROR 1819 (HY000): Your password does not satisfy the current policy requir 阅读全文
posted @ 2025-02-15 11:12
刘宏缔的架构森林
阅读(203)
评论(0)
推荐(0)
摘要:
一,下载yum库的rpm包 # wget https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm 安装: # rpm -ivh mysql84-community-release-el9-1.noarch.rpm wa 阅读全文
posted @ 2025-02-15 11:12
刘宏缔的架构森林
阅读(96)
评论(0)
推荐(0)
摘要:
一,报错信息: (parted) mkpart primary 0 100% Warning: The resulting partition is not properly aligned for best performance: 34s % 2048s != 0s Ignore/Cancel? 阅读全文
posted @ 2025-02-15 11:11
刘宏缔的架构森林
阅读(282)
评论(0)
推荐(0)
摘要:
一,代码: 1,controller/ImageController.go //得到详情 func (ic *ImageController) Detail(c *gin.Context) { // gin版本 ginVersion:=gin.Version // golang 版本 golangV 阅读全文
posted @ 2025-02-15 11:11
刘宏缔的架构森林
阅读(49)
评论(0)
推荐(0)
摘要:
一,问题: 1, 看git的log $ git log commit c3b2a014a8c7ba3bceab73b853324e84bb84e016 (HEAD -> master) Author: liuhongdi <37@qq.com> Date: Thu Feb 13 13:30:22 2 阅读全文
posted @ 2025-02-15 11:11
刘宏缔的架构森林
阅读(23)
评论(0)
推荐(0)
摘要:
一,定义格式类 主要是两个方法: Success和Failed global/result.go package global import ( "github.com/gin-gonic/gin" "time" ) //返回的结果的内容: type ResultCont struct { Stat 阅读全文
posted @ 2025-02-15 11:10
刘宏缔的架构森林
阅读(114)
评论(0)
推荐(0)
摘要:
一,中间件代码 这里我们演示一个例子:判断用户是否登录后,传递参数给controller func AuthCheck() gin.HandlerFunc { return func(c *gin.Context) { //从c得到参数后进行判断 isLogin:=1 userId:=100 if 阅读全文
posted @ 2025-02-15 11:09
刘宏缔的架构森林
阅读(32)
评论(0)
推荐(0)
摘要:
一,代码: #!/bin/bash export BUILD_ID=dontKillme #所在目录 WORKSPACE=/data/gyweb #二进制文件名 BIN_NAME=industry USER=`whoami` echo "当前用户:$USER" echo "要启动的程序:$BIN_N 阅读全文
posted @ 2025-02-15 11:09
刘宏缔的架构森林
阅读(10)
评论(0)
推荐(0)
摘要:
一,官方文档 https://hyperf.wiki/3.1/#/zh-cn/controller?id=%e9%81%bf%e5%85%8d%e5%8d%8f%e7%a8%8b%e9%97%b4%e6%95%b0%e6%8d%ae%e6%b7%b7%e6%b7%86 二,代码例子: 1,中间件 < 阅读全文
posted @ 2025-02-15 11:08
刘宏缔的架构森林
阅读(50)
评论(0)
推荐(0)
摘要:
一,安装用到的库: 1,官方文档地址: https://hyperf.wiki/3.1/#/zh-cn/phar 2,安装phar库 $ composer require hyperf/phar ./composer.json has been updated Running composer up 阅读全文
posted @ 2025-02-15 11:08
刘宏缔的架构森林
阅读(62)
评论(0)
推荐(0)
摘要:
一,result类 <?php /* 统一格式的返回json数据 */ namespace App\Lib\Result; class Result { //success:code值为0,data:数据 static public function Success($data, $code = 2 阅读全文
posted @ 2025-02-15 11:08
刘宏缔的架构森林
阅读(38)
评论(0)
推荐(0)
摘要:
一,查看现有路由: $ php bin/hyperf.php describe:route [DEBUG] [command] Commands registered by Hyperf\Command\Listener\RegisterCommandListener [DEBUG] Event H 阅读全文
posted @ 2025-02-15 11:08
刘宏缔的架构森林
阅读(47)
评论(0)
推荐(0)
摘要:
一,官方文档地址 https://hyperf.wiki/3.1/#/zh-cn/validation 安装: 这个第三方库默认没有安装,需要我们手动安装 $ composer require hyperf/validation 二,封装要用的类 1,app/Lib/BaseValidator.ph 阅读全文
posted @ 2025-02-15 11:07
刘宏缔的架构森林
阅读(118)
评论(0)
推荐(0)
摘要:
一,配置nginx 官方文档地址: https://hyperf.wiki/3.1/#/zh-cn/tutorial/nginx 配置文件: /etc/nginx/site-enabled/hyperf.conf upstream hyperf { # Hyperf HTTP Server 的 IP 阅读全文
posted @ 2025-02-15 11:07
刘宏缔的架构森林
阅读(87)
评论(0)
推荐(0)
摘要:
一,配置数据库 .env中数据库的配置: DB_DRIVER=mysql DB_HOST=localhost DB_PORT=3306 DB_DATABASE=mybase DB_USERNAME=root DB_PASSWORD=mypassword DB_CHARSET=utf8mb4 DB_C 阅读全文
posted @ 2025-02-15 11:06
刘宏缔的架构森林
阅读(46)
评论(0)
推荐(0)
摘要:
一,报错信息: SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from `news` where `news_id` = 3 limit 1) sql语句从mysql客户端命令可以正常执行,判断问题出在数据库的连接上 阅读全文
posted @ 2025-02-15 11:06
刘宏缔的架构森林
阅读(117)
评论(0)
推荐(0)