使用gzip服务器模式/类型时如何在DropWizard中禁用管理端口 [英] How to disable admin port in DropWizard while using gzip server mode/type
问题描述
我正在尝试使用 gzip服务器模式时在DropWizard中禁用管理端口。
我知道这可以在简单服务器中进行。下面是.yml文件配置。 -
I am trying to disable admin port in DropWizard while using 'gzip' server mode. I know this is possible in 'simple' server. Below is the .yml file configuration. -
server:
type: simple
但我想在gzip服务器模式下禁用管理端口。
but I want to disable admin port in gzip server mode.
server:
gzip:
bufferSize: 8KiB
注意:我不能使用'simple服务器,因为我们依赖于'gzip'。
我已经失去了主意,现在真的很感谢任何帮助。
NOTE: I cant use 'simple' server as we have dependency on 'gzip'. I am out of ideas now any help is really appreciated.
推荐答案
默认的Dropwizard配置包括一个管理连接器。为防止这种情况,您将需要明确告知它不包含任何管理连接器:
The default Dropwizard config includes an admin connector. To prevent this, you will need to explicitly tell it to not include any admin connectors:
server:
gzip:
bufferSize: 8KiB
adminConnectors: []
这篇关于使用gzip服务器模式/类型时如何在DropWizard中禁用管理端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!