目录
早上上班来到公司,无意间打开QQ群看到有人在讨论这个东西,之前也看到过无数次,也是因为感觉有趣所以记录一下实现过程。
效果图如下(图来自Q群):
简单粗暴的教程!
1.实现一个监听器
public class MyListener implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {
System.out.println(" ......................我佛慈悲......................");
System.out.println(" _oo0oo_ ");
System.out.println(" o8888888o ");
System.out.println(" 88\" . \"88 ");
System.out.println(" (| -_- |) ");
System.out.println(" 0\\ = /0 ");
System.out.println(" ___/‘---’\\___ ");
System.out.println(" .' \\| |/ '. ");
System.out.println(" / \\\\||| : |||// \\ ");
System.out.println(" / _||||| -卍-|||||_ \\ ");
System.out.println(" | | \\\\\\ - /// | | ");
System.out.println(" | \\_| ''\\---/'' |_/ | ");
System.out.println(" \\ .-\\__ '-' ___/-. / ");
System.out.println(" ___'. .' /--.--\\ '. .'___ ");
System.out.println(" .\"\" ‘< ‘.___\\_<|>_/___.’ >’ \"\". ");
System.out.println(" | | : ‘- \\‘.;‘\\ _ /’;.’/ - ’ : | | ");
System.out.println(" \\ \\ ‘_. \\_ __\\ /__ _/ .-’ / / ");
System.out.println(" =====‘-.____‘.___ \\_____/___.-’___.-’===== ");
System.out.println(" ‘=---=’ ");
System.out.println(" ");
System.out.println("....................佛祖开光 ,永无BUG...................");
}
@Override
public void contextDestroyed(ServletContextEvent servletContextEvent) {
}
}
2.在web.xml中配置监听器
<listener>
<listener-class>com.zhicall.ladder.esb.listener.MyListener</listener-class>
</listener>
大功告成,超级简单!
看一下输出效果
版权声明:本文为jqc874789596原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。