-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for running with Undertow #431
Comments
I'm trying to build a Spring Boot WAR for JBoss via the ContainerPlugin, without luck. Is it not working because xsbt-web-plugin doesn't support Undertow yet? It looks like |
Thanks for the info; that helps point me in the right direction. I will put something together for this later today. |
Can you give
|
Wow, thanks for the fast reply! I followed your steps and created a minimal reproducer here: https://github.com/AugustNagro/springboot-mvp Running with
|
I don't know much about Spring Boot, but based on the example project from https://start.spring.io/, I think you need to add one additional class: src/main/scala/com/example/mvp/ServletInitializer.scala: package com.example.mvp
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
class ServletInitializer extends SpringBootServletInitializer:
override def configure(application: SpringApplicationBuilder): SpringApplicationBuilder =
application.sources(classOf[SpringMVP]) Then run
|
Awesome, But when running on JBoss, I get
I've tried excluding the Tomcat WS dependency as per stack overflow, but no dice so far. excludeDependencies ++= Seq(
// https://stackoverflow.com/questions/25792121/spring-boot-websockets-in-wildfly?answertab=votes#tab-top
"org.apache.tomcat.embed" % "tomcat-embed-websocket"
) |
Ok, got it working in JBoss! Just switched to the ContainerPlugin. |
It looks like libraryDependencies ++= Seq(
"org.springframework.boot" % "spring-boot-starter-web" % SpringBootVersion exclude("org.springframework.boot", "spring-boot-starter-tomcat"),
Note that this has no effect on the .war file produced by |
Sweet, that's a better solution. |
https://undertow.io/undertow-docs/undertow-docs-2.0.0/#creating-a-servlet-deployment
The text was updated successfully, but these errors were encountered: