gpt4 book ai didi

java - 在 yaml 上配置 Wildfly swarm Undertow 分数

转载 作者:行者123 更新时间:2023-12-01 18:38:43 25 4
gpt4 key购买 nike

无法根据现有的 (jboss)standalone.xml 配置 thorntail project-defaults.yaml

pom.xml(使用 Thorntail 2.4.0.Final)

我正在尝试将thorntail应用程序从java 8升级到11 - 该应用程序当前正在使用jboss 10。我决定从standalone.xml转移到projects-default.yaml,因为这会将jboss/wildfly升级到最新版本基于thorntail 2.4.0。

协助转化

        <subsystem xmlns="urn:jboss:domain:undertow:8.0" default-server="default-server" default-virtual-host="default-host" default-servlet-container="default" default-security-domain="sdom">
<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="/prop" handler="properties"/>
<location name="/" handler="welcome-info"/>
<http-invoker security-realm="ApplicationRealm"/>
</host>
</server>
<servlet-container name="default">
<jsp-config/>
<websockets/>
</servlet-container>
<handlers>
<file name="welcome-info" path="${jboss.home.dir}/welcome-info" directory-listing="false"/>
<file name="properties" path="${jboss.home.dir}/" directory-listing="true"/>
</handlers>
</subsystem>

到 yaml 项目默认 - 这是我所做的。

swarm:
undertow:
handler-configuration:
files:
default:
path: "${jboss.home.dir}/"
directory-listing: true
servers:
default:
hosts:
default:
alias: localhost
locations:
default:
handler: properties
http-invoker-setting:
security-realm: ApplicationRealm
https-listeners:
default:
enable-http2: true
security-realm: ApplicationRealm
socket-binding: https
http-listeners:
default:
enable-http2: true
redirect-socket: https
socket-binding: http
servlet-containers:
default:
default-buffer-cache: default
default-virtual-host: default-host
default-servlet-container: default
default-server: default-server

但是我收到以下错误。

ERROR [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0362: Capabilities required by resource '/subsystem=undertow/server=default/host=default/location=default' are not available:
org.wildfly.extension.undertow.handler.properties; Possible registration points for this capability:
/subsystem=undertow/configuration=handler/file=*
/subsystem=undertow/configuration=handler/reverse-proxy=*
,121 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.

最佳答案

这是对我有用的配置。

swarm:
undertow:
handler-configuration:
files:
properties:
path: "${jboss.home.dir}/"
directory-listing: true
welcome-content:
path: "${jboss.home.dir}/welcome-content"
directory-listing: false
servers:
default-server:
hosts:
default-host:
alias: localhost
locations:
/prop:
handler: properties
/:
handler: welcome-content
http-invoker-setting:
security-realm: ApplicationRealm
https-listeners:
default-https:
enable-http2: true
security-realm: ApplicationRealm
socket-binding: https
http-listeners:
default:
enable-http2: true
redirect-socket: https
socket-binding: http
servlet-containers:
default:
default-buffer-cache: default
default-virtual-host: default-host
default-servlet-container: default
default-server: default-server

关于java - 在 yaml 上配置 Wildfly swarm Undertow 分数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59989429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com