Java Wildfly 13 gzip筛选器属性
之前我使用的是Jboss 7.1,在这里我为gzip过滤器配置了以下属性,这样可以提高我的产品性能。它工作得很好Java Wildfly 13 gzip筛选器属性,java,jboss,wildfly,application-server,Java,Jboss,Wildfly,Application Server,之前我使用的是Jboss 7.1,在这里我为gzip过滤器配置了以下属性,这样可以提高我的产品性能。它工作得很好 <property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="force"/> <property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" value="text/javascr
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION" value="force"/>
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES" value="text/javascript,text/css,text/html"/>
<property name="org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIN_SIZE" value="1000"/>
现在,我最近迁移到了Wildfly 13,在那里我认为,这些属性不起作用。那么,你能帮我吗
另外,是否有其他重要的配置可以提高wildfly的性能?wildfly 13使用Undertow作为其web容器,而不是JbossWeb/Apache Tomcat,因此作为Tomcat一部分的过滤器不可用。
请看一看我做了研究并找到了解决方案。请在
standalone.xml中搜索undertow,并添加与过滤器相关的配置更改,如下所述:
<subsystem xmlns="urn:jboss:domain:undertow:6.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="other">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="gzipFilter" predicate="not min-content-size[500] and regex[pattern='(?:application/javascript|text/css|text/html|text/xml|application/json)(;.*)?', value=%{o,Content-Type}, full-match=true]"/>
<filter-ref name="server-header"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
</handlers>
<filters>
<response-header name="server-header" header-name="Server" header-value="Wildfly 13"/>
<response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow"/>
<gzip name="gzipFilter"/>
</filters>
</subsystem>