Skip to the content.

spring-boot-starter-netty

[English] [中文]

Introduction

This is a Spring Boot embedded servlet container project base on netty API (4.1.12.Final).
This project has been publish into maven center repository, refer to The Central Repository.

Maven Dependencies

  1. add the dependencies below to your maven project: ```xml
org.springframework.boot spring-boot-starter-web org.springframework.boot spring-boot-starter-tomcat io.gitlab.leibnizhu spring-boot-starter-netty 1.1
2. add `scanBasePackages` property to `@SpringBootApplication` annotation in your Spring-Boot entry class, like:  
```java
@SpringBootApplication(scanBasePackages = {"io.gitlab.leibnizhu", "your.package.name"})
@EnableScheduling
public class AwpApplication extends SpringBootServletInitializer {
    public AwpApplication() {
    }

    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(new Class[]{AwpApplication.class});
    }

    public static void main(String[] args) {
        SpringApplication.run(AwpApplication.class, args);
    }
}
  1. run your Spring-Boot application and enjoy it.

Blogs about how to design/code this project

Only Chineses, updating one after another……
基于Netty的Spring Boot内置Servlet容器的实现(一)
基于Netty的Spring Boot内置Servlet容器的实现(二)
基于Netty的Spring Boot内置Servlet容器的实现(三)
基于Netty的Spring Boot内置Servlet容器的实现(四)
基于Netty的Spring Boot内置Servlet容器的实现(五)