在這以前要有搭建好maven的環境,能夠參考上一篇。maven
1。.net
2。選擇Modulesnetty
3。code
4。xml
等待一會選擇,Download to能夠不用勾選,下載的jar會放在本地的jar倉庫裏,若是勾選了則會在該項目下建立一個lib文件,而且將包放裏面。blog
5。ci
選擇一個netty包,點擊ok,接下來選擇便可。io
最後選擇便可完成。class
在該項目的pom.xml里加入netty依賴。下載
<!--netty依賴--> <dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.20.Final</version> </dependency> </dependencies>