栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

APISIX 2.13.1 docker模式下开发java ext plugin

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

APISIX 2.13.1 docker模式下开发java ext plugin

记录下以docker-compose模式运行apisix,java ext plugin 开发

socket 目录问题

不能使用/tmp/runner.sock ,/tmp 在docker 内会被map为一个目录,换一个普通目录就可以,正常map后在docker ls

root@0715b8853748:/usr/local/apisix# ls -ltr /socket
total 0
srwxr-xr-x 1 root root 0 May  1 10:10 runner.sock

第一位是s,如果使用/tmp,第一位是d。

ext-plugin 位置

ext-plugin 是与apisix平级的,完整config如下

apisix:
  node_listen: 9080              # APISIX listening port
  enable_ipv6: false

  allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
    - 0.0.0.0/0              # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.

  admin_key:
    - name: "admin"
      key: edd1c9f034335f136f87ad84b625c8f1
      role: admin                 # admin: manage all configuration data
                                  # viewer: only can view configuration data
    - name: "viewer"
      key: 4054f7cf07e344346cd3f287985e76a2
      role: viewer
  enable_control: true
  control:
    ip: "0.0.0.0"
    port: 9092

ext-plugin:
  path_for_test: /socket/runner.sock  

plugins:                          # plugin list (sorted by priority)
  - real-ip                        # priority: 23000
  - client-control                 # priority: 22000
Eclipse 下@RequiredArgsConstructor问题

Eclipse 下不能很好支持annotation RequiredArgsConstructor,运行会报构造函数不存在,改为自建构造函数即可。

 public HTTPReqCallHandler(Cache cache) {
		super();
		this.cache = cache;
	}
	
public PrepareConfHandler(Cache cache, Map filters) {
		super();
		this.cache = cache;
		this.filters = filters;
	}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/852022.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号