📄 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 + -