如果您没看过那篇文章,我可以告诉您,配置文件控制着应用哪些样式表,以及结果应该怎样。
If you missed that article, the configuration file controls which style sheets are applied and what the result should be.
在这一点上,我希望已经说服了您:注释并不总是比配置文件好。
Hopefully, I've convinced you by this point that annotations are not always better than configuration files.
例如,使用快照,在需要修改多个配置文件或对应用程序执行升级时,我可以加快备份和恢复速度(如果需要)。
For example, using snapshots, I can speed up the backup and (if necessary) the recovery times when I need to modify a number of configuration files or perform an upgrade of an application.
对于下个月的文章,我将回到在上一期文章中简要提到的一个问题,即注释与外部配置文件之间的权衡。
For next month's column, I'm going back to an issue I mentioned briefly in an earlier column: the trade-offs between annotations and external configuration files.
在XM开发的较早时期,我选择了消除配置文件。
Very early in the development of XM, I chose to banish configuration files.
我将在用到这些参数时,展示如何在XML配置文件中定义它们。
I'll demonstrate how these parameters are defined in the XML configuration files as they come into use.
我推荐下面这些类型的配置文件。
要是这个应用程序的内容更充实,那么我就可能用命令行选项、环境变量或配置文件来配置这些参数。
If this were a more fleshed-out application, I might configure these parameters with command-line options, environment variables, or a configuration file. But for now, this style is adequate.
我通常告诉大家将log4j配置文件作为类路径资源加载。
I usually tell people to load the log4j configuration file as a classpath resource.
然后它使我受到了打击,这样一个带有规则和变量(例如 $source )的配置文件天生难以使用。
And then it hit me, such a configuration file with rules and variables (such as $source) is inherently hard to use.
在安装过程中,我根据自己的环境修改了lpar2rrd配置文件。
I customized the lpar2rrd configuration file (as part of the installation instructions) to fit my environment.
作为配置文件比注释工作得好的示例,我将转用 JiBX数据绑定框架 —— 这是我自己喜欢的类处理框架。
For an example of a case where a configuration file works better than annotations, I'll turn to the JiBX data binding framework -- my own pet classworking project.
我需要通知Nagios我的配置文件将放在哪里。
I need to tell Nagios that my configuration files are going to go in there.
我选择将电子邮件信息存储在xml配置文件(如清单2中的config . xml)中。
I choose to store the E-mail information in an XML configuration file such as config.xml in Listing 2. The structure of this file is as follows.
在清单7的profiles.xml文件中,我定义了两个配置文件,并根据env (环境)属性的值激活它们。
In the profiles.xml file in Listing 7, I defined two profiles and activated them based on the value in the env (environment) property.
对我来说,配置文件的形式看起来更整齐一些,因此也就比示例中显示的一堆注释更容易维护。
To me, the configuration file form looks cleaner and therefore easier to maintain than the mass of annotations shown in the example.
例如,如果我需要编辑一系列配置文件,我将在进行任何更改之前备份这些文件。
For example, if I need to edit a series of configuration files, I would backup the files before I make any changes.
最重要的是,我使用HMC对管理的系统分区配置文件数据执行了备份。
Most importantly, I performed a backup of the managed systems partition profile data, using the HMC.
那么,我把配置文件放在哪里呢?
为了显示logger .properties配置文件的强大功能,在创建该文件时我非常小心。
I was careful when creating the logger.properties configuration file in order to show some of its strengths.
我最喜欢的方式是使用配置文件并在配置文件中定义一个常量,这个常量保留date函数的格式字符串。
My favorite is to use a configuration file and define a constant in it that holds the format string for the date function.
我要处理这样一个场景,即假设您想构建一个WAR文件,它包含Dojo和您正在创建的小部件的优化配置文件。
I'll address the scenario where you want to build a WAR file that contains Dojo along with an optimized profile for the widgets you are creating.
我也推荐大家通过命令行来测试新的shell,然后再将改动添加到配置文件中。
I also recommend testing a new prompt via the command line, before committing it to the configuration file.
在讨论piomkpq时,我提到您可以手动查看连接类型配置文件,因为这些文件属于ASCII文本。
While talking about piomkpq, I mentioned that you could manually view the attachment type configuration files because the files are ASCII text.
对于我自己的JiBX项目,我倾向于依然采用配置文件,因为我认为这些对表示JiBX绑定更合适一些。
For my own JiBX project, I intend to stay with configuration files, because I think these are better suited to represent JiBX bindings.
我曾遇到过这样的情况:在项目收尾的时候,我很难将Capistrano的配置文件直接推给客户。
I have occasionally had serious difficulty 'handing off' a Capistrano config to a customer at the end of a project.
通过“我的更新”来保持实时更新的功能,向配置文件中加入状态,或在伙伴的配置文件中添加评论。
The ability to keep up with "My updates," post status updates to profiles, or add a comment to a colleague's profile.
您可能已经猜到,我不建议在XML配置文件中定义脚本bean(或这一方面的任何类型的代码)。
As you might have guessed, I don't recommend defining scripted beans inside XML configuration files (or any type of code inside XML files for that matter).
您可能已经猜到,我不建议在XML配置文件中定义脚本bean(或这一方面的任何类型的代码)。
As you might have guessed, I don't recommend defining scripted beans inside XML configuration files (or any type of code inside XML files for that matter).
应用推荐