When the Netty source code analysis note runs the example example that comes with the Netty source code, the compilation fails.
The main sharing, in the run netty source code comes with the example, encountered problems:
The main steps are as follows:
1. Download the netty source code from git [netty-netty-4.1.6.Final]
2. Import directly into Intellij idea
3. Run echo example under example module
The following errors are reported:
Obviously, dependency packages were missing, and I wondered why netty was missing dependency packages when it was such a good framework.
Solutions:
Add dependencies to pom file of handler module
org.apache.tomcat tomcat-jni 8.5.20 org.eclipse.jetty.alpn alpn-api 1.1.3.v20160715 provided
Run again,
EchoServer
It can be compiled and run normally, as shown in the following figure:
In summary:
There should also be skepticism about good frameworks.