美文网首页
如何在web环境中配置applicationContext.xm

如何在web环境中配置applicationContext.xm

作者: null_14ee | 来源:发表于2019-06-08 20:19 被阅读0次

如何在web环境中配置applicationContext.xml文件?

<listener>

   <listener-class>

    org.springframework.web.context.ContextLoaderListener

   </listener-class>

</listener>

或:

<servlet>

   <servlet-name>context</servlet-name>

    <servlet-class>

     org.springframework.web.context.ContextLoaderServlet

    </servlet-class>

   <load-on-startup>1</load-on-startup>

</servlet>

通过如下方法取出applicationContext实例:

相关文章

网友评论

      本文标题:如何在web环境中配置applicationContext.xm

      本文链接:https://www.haomeiwen.com/subject/aynlxctx.html