263.8. 在 Java DSL 中配置

您必须在 name 属性下创建并注册 PropertiesComponent,例如:

PropertiesComponent pc = new PropertiesComponent();
pc.setLocation("classpath:com/mycompany/myprop.properties");
context.addComponent("properties", pc);