?? crmservicefactory.java
字號:
package net.robin.crm.service;
import java.io.IOException;
import java.util.Properties;
public abstract class CRMServiceFactory {
private static CRMServiceFactory instance;
protected static Properties config;
private static final String DEFAULT_CONFIG = "/crm.config.properties";
public CRMServiceFactory() {
super();
// TODO 自動生成構造函數存根
}
public static CRMServiceFactory getInstance() throws ConfigException, InstanceExeption {
if(config==null){
config = new Properties();
try {
config.load(CRMServiceFactory.class.getResourceAsStream(DEFAULT_CONFIG));
} catch (Exception e) {
e.printStackTrace();
throw new ConfigException(e);
}
}
if(instance==null){
//init instance
instance = new CRMServiceFactoryXMLImpl();
}
return instance;
}
public abstract CRMService getCRMService() throws ServiceException ;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -