天天看點

SpringBoot入門(12)- SpringBoot web更換jetty伺服器

1、排除tomcat預設依賴

<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-tomcat</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
           

2、添加jetty依賴

<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jetty</artifactId>
		</dependency>
           

伺服器的資訊配置項參考:

autoconfig下的

SpringBoot入門(12)- SpringBoot web更換jetty伺服器