Web服务器设计中的ApplicationContext是什么?
有人可以向我解释以下内容:
- 什么是
ApplicationContext
? ApplicationContext
和HttpSession
之间有什么区别?
找到了这个实现,但无法理解这个概念。 http://mythinkpond.wordpress.com/2010/03/22/ spring-application-context/
can someone please explain to me the followings:
- what is is
ApplicationContext
? - what is the difference between
ApplicationContext
andHttpSession
?
found this implementation but can't understand the concept.
http://mythinkpond.wordpress.com/2010/03/22/spring-application-context/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Java EE 具有 ServletContext 的概念,它是一个用于与运行 Java EE 应用程序的容器进行通信的接口。
Spring 框架有一个
ApplicationContext
类,它是与 Spring 容器通信的一种方式。换句话说,它是与 Spring 框架通信的高级方式。HttpSession 是应用程序服务器为客户端发出的一系列请求维护的状态。 HTTP 协议本身是无状态的,因此这是保存有关用户交互的一些数据的一种方法。
Java EE has the concept of an
ServletContext
, which is an interface for communicating with the container that is running a Java EE application.The Spring framework has an
ApplicationContext
class which is a way of communicating with the Spring container. In other words, it's a high level way of communicating with the Spring framework.An HttpSession is state maintained by an application server for a series of requests made by a client. The HTTP protocol itself is stateless, so this is a way to keep some data about the user's interactions around.