`

从.property文件中取值: 打开declaration 或者 xxx.properties文件

 
阅读更多

从.property文件中取值: 打开declaration 或者 xxx.properties文件

 

将鼠标放在Configuration.getString("xx");的Configuration 或者getString上。

 

 

 public ChequeDeliveryFeedManager() throws IOException{
        fullChequeList=Configuration.getString("fullChequeList"); //$NON-NLS-1$
        updateLog=Configuration.getString("chequeUpdateLog"); //$NON-NLS-1$
        fmi = (FeedManagerInterface) new ChequeFeed();
    	log = new FileWriter(updateLog, true);
    	_format = new SimpleDateFormat(Configuration.getString("chequeDateFormat")); //$NON-NLS-1$
        System.out.println("Log File: " + updateLog); //$NON-NLS-1$
    }

public class Configuration {
	private static final String BUNDLE_NAME = "deliveryPath"; //$NON-NLS-1$

	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
			.getBundle(BUNDLE_NAME);

	private Configuration() {
	}

	public static String getString(String key) {
		try {
			return RESOURCE_BUNDLE.getString(key);
		} catch (MissingResourceException e) {
			return '!' + key + '!';
		}
	}
}

 

 

分享到:
评论

相关推荐

    修复RzBorder.pas Number of elements differs from declaration

    RzBorder.pas Number of elements differs from declaration TRzLEDCharacters 在装完Raize控件之后编译老是出如下错误: [Pascal Error] RzBorder.pas(1429): E2072 Number of elements (125) differs from ...

    keil常见错误.pdf

    keil常见错误 main.c(35): warning: #128-D: ...initSpi.c(6): error: #268: declaration may not appear after executable statement in block main.c(31): warning: #223-D: function "initNvic" declared implicitly

    yaffs_vfs.c, android

    fs/yaffs2/yaffs_vfs.c:2383:2: error: implicit declaration of function 'get_sb_bdev' fs/yaffs2/yaffs_vfs.c: At top level: fs/yaffs2/yaffs_vfs.c:2390:2: error: unknown field 'get_sb' specified in ...

    keil错误集V1.0.pdf

    开发资料\我的资料\keil错误集V1.0.pdf 一、 main.c(35): warning: #128-D: loop is not ...initSpi.c(6): error: #268: declaration may not appear after executable statement in block 改正(定义变量放前)

    EurekaLog_7.5.0.0_Enterprise

    32)..Changed: Descriptions of EurekaLog project options now list corresponding property names of TEurekaModuleOptions class. 33)..Changed: Default template of ...

    Avalon总线下的PWM IP Core.rar

    Avalon总线下的PWM IP Core pwm_avalon_interface.rar pwm_source_new.zip

    lua-5.3.4.tar.gz Mylua-5.3.4.tar.gz lua生成动态库 lua包管理 pkgconfig PKG_CONFIG_PATH

    在源码包中,此宏定义在GCC中,打开lua-5.3.4/src/Makefile,可以看到:CFLAGS= -O2 -Wall -Wextra -DLUA_COMPAT_5_2 $(SYSCFLAGS) $(MYCFLAGS)。 默认编译后,再回头编译vlc开源库,发现:lua/demux.c:55:13: 错误...

    LuaBind 源码 (Lua增强库)

    能力支持函数式的定义一个Lua类,而且使之继承自C++或者Lua. Lua类可以覆写从 C++ 基类 继承来的虚函数. 她的目标平台是Lua 5.0 ,不能支持Lua 4.0 . 她利用模板原编程技术实现.这意味着,你不需要额外的预处理过程去...

    STM32F103 MAX31865程序.zip

    本人项目亲测可用 STM32F103C8T6 温度控制精度精准

    dubbo找不到dubbo.xsd报错

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    Android代码-android-async-http

    ...Changelog See what is new in version 1.4.9 released on 19th September 2015 ...Javadoc Latest Javadoc for 1.4.9 release are available here (also included in Maven repository): ...Features ...

    五子棋 源码

    原文件是老版本的,打开的时候可能会提醒你转换~~ +作者设置了只读属性,建议先把只读属性去除…… 据说是 vc2005 的语法检查更加的严格了,所以会有一些 warning ~~~~~可以忽略的…… 另外还是会有一个...

    dubbo.xsd文件下载

    dubbo配置xml文件报错“Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - ...

    raft:Go中的筏式实施

    这是Go中Raft分布式共识算法的指导性实现。 它伴随着一系列博客文章: 该存储库中的每个partN目录都是博客文章系列N部分的完整源代码(第0部分除外,该部分是入门性的,没有代码)。 在不同的partN目录之间有很多...

    STM32_MAX31865_HAL库程序及资料.zip

    MAX31865使用HAL库程序读取温度及相关芯片资料和bug

    apt-mirror-api-0.1.jar

    Files contained in apt-mirror-api-0.1.jar: ...com.sun.mirror.declaration.ClassDeclaration.class com.sun.mirror.declaration.ConstructorDeclaration.class com.sun.mirror.declaration.Declaration.class ...

    hibernate3.6 文档(pdf 格式)

    3.4. Optional configuration properties ........................................................................ 34 3.4.1. SQL Dialects ....................................................................

    dubbo.xsd 约束文件 解决标签识别报红

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    hibernate_reference中文文档.pdf

    3.4.5. 查询语言中的替换 ............................................... 43 3.4.6. Hibernate 的统计(statistics)机制 ............................. 43 3.5. 日志 ...........................................

    dubbo.xsd文件资源

    在myeclipse中使用dubbo时报一下的错误信息:Multiple annotations found at this line: - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:...

Global site tag (gtag.js) - Google Analytics