此内容没有您所选择的语言版本。
12.9. Using the @ConfigParam Annotation
This example show the annotated component
DataSeeder
and its corresponding Smooks configuration:
public class DataSeeder { @ConfigParam private File seedDataFile; public File getSeedDataFile() { return seedDataFile; } // etc... }
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"> <resource-config selector="dataSeeder"> <resource>com.acme.DataSeeder</resource> <param name="seedDataFile">./seedData.xml</param> </resource-config> </smooks-resource-list>