【问题标题】:Spring Cloud Stream App Custom Properties not showing up in Cloud Data Flow UISpring Cloud Stream App 自定义属性未显示在 Cloud Data Flow UI 中
【发布时间】:2020-11-05 00:05:37
【问题描述】:

创建了一个具有自定义属性的处理器应用。应用程序属性已列入白名单。在将应用程序注册到 Spring Cloud Data Flow 时,自定义属性未显示在应用程序属性 UI 页面中。

-------------------------------------------------
@EnableBinding(Processor.class)
@EnableConfigurationProperties(CustomProperties.class)
@SpringBootApplication
public class CustomProcessorApplication {

    @Autowired
    private CustomProperties processorProperties;

---------------------------------------------------------

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties
public class CustomProperties {

---------------------------------------------------------
Entry in src/main/resources/META-INF/dataflow-configuration-metadata-whitelist.properties
configuration-properties.classes=io.spring.dataflow.file.item.CustomProperties

---------------------------------------------------------
Entry in src/main/resourcesMETA-INF/spring-configuration-metadata-whitelist.properties
configuration-properties.classes=io.spring.dataflow.file.item.CustomProperties

【问题讨论】:

标签: spring-cloud-stream spring-cloud-dataflow


【解决方案1】:

你需要有spring-boot-configuration-processor,例如,

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-configuration-processor</artifactId>
</dependency>

此外,如果您使用的是 SCDF 2.6 或更高版本,则不推荐使用 dataflow-configuration-metadata-whitelist.properties 以支持 dataflow-configuration-metadata.properties。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-28
    • 2019-01-23
    • 2020-10-15
    • 1970-01-01
    • 2020-01-13
    • 1970-01-01
    • 2020-12-22
    • 1970-01-01
    相关资源
    最近更新 更多