我尝试将 Spring Boot 与 Vaadin 7.7.0 一起使用。默认情况下,如果我不指定,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>
一切正常。
我不知道这个包裹发生了什么。是否存在依赖冲突?