Era note (2026): This 2019 walkthrough pins WildFly 18.0.1.Final / JDK 11 / Gradle 5.6 - all long EOL (WildFly 18 is unsupported; current is WildFly 41, released Jul 2026). Packaging a Spring Boot WebFlux app as a WAR for an external app server is no longer the recommended deployment model - prefer a self-executable JAR or a GraalVM native image. The mechanics below still work for legacy environments.
Wildfly: 18.0.1.Final
JDK: 11.0.2
Gradle: 5.6.2
Web: Webflux
create springboot demo project by initializer





write a test case

build package

deploy it to JBoss
You can put boot.war to $JBOSS_HOME/standalone/deployments/, then run $JBOSS_HOME/bin/standalone.bat by administrator.
It will output hello world, springboot.