OpenResty 最主要的应用场景之一是 API Server,有别于传统 Nginx 的代理转发应用场景,API Server 中心内部有各种复杂的交易流程和判断逻辑,学会高效的与其他 HTTP Server 调用是必备基础。
作者:AlbertWen
添加时间:2019-03-31 16:16:50
修改时间:2025-09-09 04:05:58
分类:15.OpenResty_Lua
编辑
作者:AlbertWen
添加时间:2016-04-17 17:45:20
修改时间:2025-09-12 14:16:08
分类:06.Linux软件安装
编辑
VirtualBox 从 4.3.36 升级到 5.0.16 时,遇到 “共享文件夹挂载失败错误”:
/sbin/mount.vboxsf: mounting failed with the error: No such device
stackoverflow.com 上也有人遇到过这个问题:
http://stackoverflow.com/questions/...mounting-failed-with-the-error-no-such-device
作者:AlbertWen
添加时间:2018-11-04 16:01:22
修改时间:2025-09-15 09:47:13
分类:18.系统设计/UML建模
编辑
作者:AlbertWen
添加时间:2017-10-29 21:00:06
修改时间:2025-09-09 23:30:19
分类:02.Golang编程
编辑
注意:这些“坑”不是bug,只是自己当时没搞明白。
用到的框架为 Beego
1、字典 map 是“引用类型”,本身就是指针,作为参数传递时,直接传 map 变量名即可(不要传 map 变量指针)。
在调用方法内,如果修改了 map 变量值,外部的 map 变量值也会被改变的!
作者:AlbertWen
添加时间:2015-10-24 09:15:50
修改时间:2025-09-15 17:42:18
分类:13.C/C++/Rust/仓颉
编辑
安装参数:
--openssldir=OPENSSLDIR
安装目录,默认是 /usr/local/ssl 。
--prefix=PREFIX
设置 lib include bin 目录的前缀,默认为 OPENSSLDIR 目录。
作者:AlbertWen
添加时间:2015-11-22 17:45:13
修改时间:2025-09-17 09:54:21
分类:13.C/C++/Rust/仓颉
编辑
如何查看 glib库 的版本号?
因为 ldd 命令是 glibc 提供的,所以也可通过它来查看 glib版本号: ldd --version
作者:AlbertWen
添加时间:2017-10-27 19:43:25
修改时间:2025-09-09 05:28:58
分类:06.Linux软件安装
编辑
./configure --with-mysql=/backup/mysql --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-curl --with-gd --enable-gd-native-ttf --with-apxs2=/usr/local/apache/bin/apxs --enable-sockets --with-iconv
make时提示:
..................................................... ext/iconv/.libs/iconv.o(.text+0x1738): In function `zif_iconv_mime_encode': /home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1017: undefined reference to `libiconv_open' ext/iconv/.libs/iconv.o(.text+0x1756):/home/jjdai/work/zhupiter/php-5.2.0/ext/iconv/iconv.c:1031: undefined reference to `libiconv_open'
作者:AlbertWen
添加时间:2015-11-25 12:36:44
修改时间:2025-09-17 10:00:20
分类:06.Linux软件安装
编辑
操作步骤如下:
1、打开虚拟机中的 Ubuntu 系统;
2、安装“增强工具”
3、设置“共享文件夹”
用注解 @Before(Tx.class) 实现 事务回滚
@Before(Tx.class) public void pay() throws Exception { //throws exception; }
方法体不能扑捉异常,所有的异常都抛出,当出现异常时事物将回滚(即 事务的回滚 是依赖 抛出异常 来实现的)
优点:简单暴力,不需要去处理每个异常,直接抛出即可;
缺点:不能详细的区分返回数据、视图,只能笼统的报出异常;