简单介绍一个WebApplicationInitializer接口,它里面有一个onStartUp方法,参数是一个ServletContext的对象,实现该接口,就必须重写该方法。通过ServletContext对象我们可以添加一些其它的设置,比如定义servlet,Listener等,具体看如下所示:



简单介绍一个WebApplicationInitializer接口,它里面有一个onStartUp方法,参数是一个ServletContext的对象,实现该接口,就必须重写该方法。通过ServletContext对象我们可以添加一些其它的设置,比如定义servlet,Listener等,具体看如下所示:
本文标题:15.WebApplicationInitializer接口
本文链接:https://www.haomeiwen.com/subject/xbqygftx.html
网友评论