2

I setup up a simple web project in spring boot with only the compile("org.springframework.boot:spring-boot-starter-web") dependency . When I used gradlew bootRun, the application starts up and I am able to get the webpage. If a fat jar is created either manually or through shadow plugin, the jar file refuses to start citing EmbeddedServletContainerFactory missing. Am I missing some other dependencies. The jar task is modified as

jar {
    from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } }
}
4

1 回答 1

3

为了让 Spring Boot 创建 uber-jar(包含嵌入式 servlet 容器),您需要运行gradle build.

于 2014-07-09T06:13:32.177 回答