即使我使用tomcat,使用vaadin运行jetty的Spring启动

时间:2016-08-26 04:15:11

标签: spring-boot vaadin vaadin7 vaadin4spring

我尝试使用Vaadin 7.7.0进行Spring启动。默认情况下,如果我没有指定,则spring boot使用tomcat。但是,我发现有一个日志如下:

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

我通过eclipse检查依赖关系并且没有码头。

以下是问题的依赖关系

如此强大的版本怎么来?

<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>

经过删除检查后发现错误的码头来自

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

删除后可以添加

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

一切正常。

我不知道这个包裹发生了什么。是否存在依赖性冲突?

1 个答案:

答案 0 :(得分:2)

Jetty用于Vaadin的Push功能,已经包含在内。