??????????????????????????????????????
???????????? ???????[ 2013/5/21 14:44:39 ] ????????
????????????Щ??????????????????????
1?????????費(fèi)???????????????????????api???????????????д????
2??????д??????PropFactory????????á?????????д???ajoo way of reading property????д???bjoo way of reading property????????????????????????????????????????Э????????
3???????????????????????????????????????????????????????????????????????????????????????
4?????????PropFactory????????????????κ????????????????????build process?? deploy process??????????????????????????nightly build???????????????????????
????????????????????????ClassLoader.loadResourceAsStream??????????????????????????????????????????????????????????????????????????
??????????PropFactory??????????????????????????commons logging?? log4j??????????????????????????д??PropFactory????????????ClassLoader??????????????????????????
???????“?????”??????б??????????????????????д??????????jsp?????????????????????servlet????????????????html??????????????????????????jsp?????????????servlet????html.
????????????????????Э????????????Map????????in house framework????????????????????????
??????????????
new ImplFactoryProxy(PropFactory.getInstance().getProperty("defaults.properties").toProperties())
???toProperties()??PropFactory?????????????????????????inhouse??IProperties?????java.util.Properties??
??????????????????в???ioc??????????£????????????????????????ServiceFactory??????????
public class ServiceFactoryUtil {
public static ServiceFactory getServiceFactory();
}
??????????PropFactory.getInstance()????????singleton???????????????properties?????
?????????????????????
?????????????????????????????????Map????????ImplFactoryProxy?????????PropFactory??????????????????????
?????????????????????????????????????????????java.util.Map??????????IProperties??
??μ??????
1????????????????toProperties()???á?????????????????????????“???????????????”??
2??java.util.Map?????????????????????????get()???????keySet()??containsKey()???????java.util.Map???????
??????????IProperties?????????
1??IProperties???????????????????jdk?????????????java.util.Map???IProperties??????????IProperties???????????“???”??á?
2??????????????????toProperties()???????????????????????????????????е????????????
3??????java.util.Map????С????IProperties????????????Щ?????????????
4???????????????????????????????IProperties????????PropFactory.getInstance()???????????????????IProperties????????????????磬?????????????????????????????????????????IProperties?????Serializable????????ServiceFactory?????Serializable???????????????????????????IProperties??????????????????????????
?????????????????????????????????????????????????????????????????????У???????????????????“??С????”??????????????????????????????“????”???????????????ɡ??????????????С??????????????DRY??unit test????????????????????????
?????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11