Spring boot with vaadin run jetty even though I use tomcat

ぐ巨炮叔叔 提交于 2019-12-11 05:09:24

问题


I try to use Spring boot with Vaadin 7.7.0. By default, spring boot use tomcat if I don not specify. However, I found there is a log as below:

2016-08-26 12:08:49.897  INFO 3240 --- [           main] e.j.JettyEmbeddedServletContainerFactory : Server initialized with port: 8080
2016-08-26 12:08:49.900  INFO 3240 --- [           main] org.eclipse.jetty.server.Server          : jetty-8.y.z-SNAPSHOT

I check the dependency through eclipse and there is no jetty.

Here is the dependency for the problem

How could a such strong version come?

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-configuration-processor</artifactId>
    <optional>true</optional>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-spring-boot-starter</artifactId>
    <version>1.0.0</version>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client</artifactId>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiler</artifactId>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-push</artifactId>
</dependency>

After checking by remove I found that the wrong jetty comes from

<dependency>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-client-compiler</artifactId>
    <scope>provided</scope>
</dependency>

After remove it can add

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <scope>provided</scope>
</dependency>

Everything works fine.

I don't know what happened to this package. Is it any dependency conflict?


回答1:


Jetty is used for the Push feature of Vaadin and is already included.



来源:https://stackoverflow.com/questions/39158193/spring-boot-with-vaadin-run-jetty-even-though-i-use-tomcat

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