log4jinit.java

来自「信息发布 发布系统 动态的菜单 和 信息统计」· Java 代码 · 共 32 行

JAVA
32
字号
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 + =
减小字号Ctrl + -
显示快捷键?