springboot把内嵌的tomcat容器改为jetty

 1、排除spring-boot-starter-tomcat依赖


			org.springframework.boot
			spring-boot-starter-web
			
				
					org.springframework.boot
					spring-boot-starter-tomcat
				
			

 2.添加spring-boot-starter-jetty依赖


			org.springframework.boot
			spring-boot-starter-jetty
			

3.最终pom.xml文档如下。 



	4.0.0
	
		org.springframework.boot
		spring-boot-starter-parent
		2.1.4.RELEASE
		 
	
	com.zhong
	chapter02
	0.0.1-SNAPSHOT
	demo
	Demo project for Spring Boot
	
		1.8
	
	
		
			org.springframework.boot
			spring-boot-starter-web
			
				
					org.springframework.boot
					spring-boot-starter-tomcat
				
			
		
		
			org.springframework.boot
			spring-boot-starter-test
			test
		
		
		
			org.springframework.boot
			spring-boot-starter-jetty
			
		
		
	
	
		
			
				org.springframework.boot
				spring-boot-maven-plugin
			
		
	

 

你可能感兴趣的:(SpringBoot)