【发布时间】:2013-07-02 14:47:53
【问题描述】:
现在直接进入我的观点,
在JSP 我会做我的应用程序的初始化过程,比如,
<%! public void jsp_init(){
//Initialise the domain server to create protocol
//Create the logging file
}%>
现在我要重建我以前的应用程序,从 Servlets 到 Spring 3.2。
我如何使用Spring 3.2 做到这一点?
我的一个colleague 说我要这样做initialization with Constructor of the Spring Controller。
因为我在applicationContext.xml 中为controller class 创建了bean,并且我正在使用ContextLoadListner 在web.xml 中加载applicationContext.xml 文件。
这是正确的初始化方式吗?
春天的ApplicationListener怎么样?
在spring 3.2 中初始化应用程序的最佳方法是什么?
希望我们的堆栈用户能给出一个好的解决方案。
【问题讨论】:
标签: java spring jsp spring-mvc initialization