如何使用jboss.cli添加下拖自定义过滤器
服务器:WindFly 15,Undertow 8 我根据本文创建了一个自定义过滤器“MyFilter”。但是我没有找到使用jboss.cli将其添加到配置中的方法 我尝试了/subsystem=undertow/configuration=filter/filter=myFilter/:add(module=com.xxx.myFilter,class name=com.xxx.myFilter),但出现以下错误:如何使用jboss.cli添加下拖自定义过滤器,jboss,servlet-filters,undertow,Jboss,Servlet Filters,Undertow,服务器:WindFly 15,Undertow 8 我根据本文创建了一个自定义过滤器“MyFilter”。但是我没有找到使用jboss.cli将其添加到配置中的方法 我尝试了/subsystem=undertow/configuration=filter/filter=myFilter/:add(module=com.xxx.myFilter,class name=com.xxx.myFilter),但出现以下错误: ERROR [org.jboss.as.cli.CommandContext]
ERROR [org.jboss.as.cli.CommandContext] Failed to get the list of the operationproperties: "WFLYCTL0030: No resource definition is registered for address [
("subsystem" => "undertow"),
("configuration" => "filter"),
("filter" => "myFilter")
因此,我们是否只能通过手动编辑配置文件来添加过滤器?您可以使用cli通过以下命令添加过滤器:
/subsystem=undertow/configuration=filter/custom-filter
可以找到最初的答案
这与上解释的自定义过滤器创建有关 提示 主要提示是使用
选项卡
,然后自动完成
/subsystem=undertow/configuration=filter/response-header=new-response-header:add(header-name=new-response-header,header-value="My Value")