1 Main函数
PetClinicStandalone
里面基本上简单到只要调用几个context.xml文件可以启动一个应用程序
//context.xml存放的路径
String rootContextDirectoryClassPath = "/org/springframework/richclient/samples/petclinic/ctx";
//启动用的xml,里面只有一个splash bean,来显示ICQ启动时候的公司logo一样的东西
String startupContextPath = rootContextDirectoryClassPath + "/common/richclient-startup-context.xml";
//这个文件很关键,应用程序的配置主要是从这里开始的
String richclientApplicationContextPath = rootContextDirectoryClassPath
+ "/common/richclient-application-context.xml";
//定义了属性面板的一个文件
String richclientPreferenceContextPath = rootContextDirectoryClassPath
+ "/common/richclient-preference-context.xml";
//业务模型,这个大家最熟悉了
String businessLayerContextPath = rootContextDirectoryClassPath + "/common/business-layer-context.xml";
//acegisecuriry的权限管理,我不是很喜欢
String securityContextPath = rootContextDirectoryClassPath + "/standalone/security-context.xml";
//然后laungch,这样程序就启动了
new ApplicationLauncher(startupContextPath, new String[] { richclientApplicationContextPath,
richclientPreferenceContextPath, businessLayerContextPath, securityContextPath });
博客介绍了Java中PetClinicStandalone应用程序的启动方式,主要通过调用多个context.xml文件来实现。详细列出了各文件的存放路径及作用,如richclient-application-context.xml是应用程序配置的关键文件,最后通过ApplicationLauncher启动程序。
3713

被折叠的 条评论
为什么被折叠?



