📄 log4jinit.java
字号:
package com.xuntian.material.init;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.xuntian.material.util.LogUtil;
public class Log4jInit extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 11389690483720138L;
public void init() throws ServletException{
try {
// LogUtil.init();
LogUtil.getLogger(this).info("************************************");
LogUtil.getLogger(this).info("**welcome to the xuntian material**");
LogUtil.getLogger(this).info("************************************");
} catch (Exception e) {
e.printStackTrace();
}
}
public void doGet(HttpServletRequest request,HttpServletResponse response)throws
IOException, ServletException {}
public void doPost(HttpServletRequest request,HttpServletResponse response)throws
IOException, ServletException {}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -