Spring Boot webserver works fine in Eclipse, fails to start on Server : missing EmbeddedServletContainerFactory bean

六月ゝ 毕业季﹏ 提交于 2019-12-04 13:27:54

And the answer is ... Don't use the maven-assembly-plugin. Reading further on in the documentation, we see that Spring has made their own plugin for this, the spring-boot-maven-plugin. Changing the pom.xml to remove the maven-assembly-plugin and use instead:

    <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <executions>
            <execution>
                <goals>
                    <goal>repackage</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

solves the problem.

I decided to leave this question up in case anyone else runs into this problem. You think you know how to do something, but time marches on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!