The answer is to create a generic helper class to both obtain the initial context and look up the home interface for every bean in the application.
英
美
- 答案是创建通用助手类,它既可以为应用程序中的每个bean获取初始上下文,又可以为它们查找home接口。