Skip to content
/ Jinx Public
forked from dromara/Jinx

Spring-boot框架采用netty取代tomcat 来做http服务

License

Notifications You must be signed in to change notification settings

SageBo/Jinx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jinx-netty

Spring-boot框架采用netty取代tomcat 来做http服务

Spring-boot用户

  • 首先引起jar包
<dependency>
    <groupId>com.happylife.netty</groupId>
     <artifactId>happylife-netty</artifactId>
      <version>1.0-SNAPSHOT</version>
</dependency>

  • 在spring-boot的Application类中加上如下代码:
@Bean
public EmbeddedServletContainerFactory servletContainer(){
  NettyContainerConfig nettyContainerConfig = new NettyContainerConfig();
  NettyEmbeddedServletContainerFactory factory = new NettyEmbeddedServletContainerFactory(nettyContainerConfig);
  return factory;
}

About

Spring-boot框架采用netty取代tomcat 来做http服务

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%