All Projects → dromara → Jinx

dromara / Jinx

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

Programming Languages

java
68154 projects - #9 most used programming language

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;
}

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].