📄 httpserver.java
字号:
package com.eshore.pubservice.http;
import com.eshore.pubservice.http.codec.HttpCodecFactory;
import com.eshore.pubservice.http.handle.HttpHandlerFactory;
import com.eshore.pubservice.nio.ServerThread;
/**
* Http Server 启动类.
*
* @author lishuisheng
*
*/
public class HttpServer {
private static final int PORT=80;
public static void main(String arg[]){
HttpCodecFactory codecFactory=new HttpCodecFactory();
HttpHandlerFactory handlerFactory=new HttpHandlerFactory();
ServerThread st=new ServerThread(codecFactory,handlerFactory);
st.setPort(PORT);
st.startServer();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -