Skip to content

dromara/Jinx

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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