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