java类org.springframework.boot.autoconfigure.condition.ConditionalOnClass的实例源码

RocketMQAutoConfiguration.java 文件源码 项目:spring-boot-starter-rocketmq 阅读 43 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(DefaultMQProducer.class)
@ConditionalOnMissingBean(DefaultMQProducer.class)
@ConditionalOnProperty(prefix = "spring.rocketmq", value = {"nameServer", "producer.group"})
public DefaultMQProducer mqProducer(RocketMQProperties rocketMQProperties) {

    RocketMQProperties.Producer producerConfig = rocketMQProperties.getProducer();
    String groupName = producerConfig.getGroup();
    Assert.hasText(groupName, "[spring.rocketmq.producer.group] must not be null");

    DefaultMQProducer producer = new DefaultMQProducer(producerConfig.getGroup());
    producer.setNamesrvAddr(rocketMQProperties.getNameServer());
    producer.setSendMsgTimeout(producerConfig.getSendMsgTimeout());
    producer.setRetryTimesWhenSendFailed(producerConfig.getRetryTimesWhenSendFailed());
    producer.setRetryTimesWhenSendAsyncFailed(producerConfig.getRetryTimesWhenSendAsyncFailed());
    producer.setMaxMessageSize(producerConfig.getMaxMessageSize());
    producer.setCompressMsgBodyOverHowmuch(producerConfig.getCompressMsgBodyOverHowmuch());
    producer.setRetryAnotherBrokerWhenNotStoreOK(producerConfig.isRetryAnotherBrokerWhenNotStoreOk());

    return producer;
}
MetricsAutoConfiguration.java 文件源码 项目:micrometer 阅读 45 收藏 0 点赞 0 评论 0
/**
 * If AOP is not enabled, scheduled interception will not work.
 */
@Bean
@ConditionalOnClass(name = "org.aspectj.lang.ProceedingJoinPoint")
@ConditionalOnProperty(value = "spring.aop.enabled", havingValue = "true", matchIfMissing = true)
public ScheduledMethodMetrics metricsSchedulingAspect(MeterRegistry registry) {
    return new ScheduledMethodMetrics(registry);
}
RssDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 33 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(RssDataFormat.class)
public RssDataFormat configureRssDataFormat(CamelContext camelContext,
        RssDataFormatConfiguration configuration) throws Exception {
    RssDataFormat dataformat = new RssDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
BeanIODataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 40 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BeanIODataFormat.class)
public BeanIODataFormat configureBeanIODataFormat(
        CamelContext camelContext,
        BeanIODataFormatConfiguration configuration) throws Exception {
    BeanIODataFormat dataformat = new BeanIODataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
Base64DataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 32 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(Base64DataFormat.class)
public Base64DataFormat configureBase64DataFormat(
        CamelContext camelContext,
        Base64DataFormatConfiguration configuration) throws Exception {
    Base64DataFormat dataformat = new Base64DataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
ZipFileDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 38 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ZipFileDataFormat.class)
public ZipFileDataFormat configureZipFileDataFormat(
        CamelContext camelContext,
        ZipFileDataFormatConfiguration configuration) throws Exception {
    ZipFileDataFormat dataformat = new ZipFileDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
MimeMultipartDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 29 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(MimeMultipartDataFormat.class)
public MimeMultipartDataFormat configureMimeMultipartDataFormat(
        CamelContext camelContext,
        MimeMultipartDataFormatConfiguration configuration)
        throws Exception {
    MimeMultipartDataFormat dataformat = new MimeMultipartDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
StringDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 37 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(StringDataFormat.class)
public StringDataFormat configureStringDataFormat(
        CamelContext camelContext,
        StringDataFormatConfiguration configuration) throws Exception {
    StringDataFormat dataformat = new StringDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
ZipDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 44 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ZipDataFormat.class)
public ZipDataFormat configureZipDataFormat(CamelContext camelContext,
        ZipDataFormatConfiguration configuration) throws Exception {
    ZipDataFormat dataformat = new ZipDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
FlatpackDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 43 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FlatpackDataFormat.class)
public FlatpackDataFormat configureFlatpackDataFormat(
        CamelContext camelContext,
        FlatpackDataFormatConfiguration configuration) throws Exception {
    FlatpackDataFormat dataformat = new FlatpackDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
DigitalSignatureComponentAutoConfiguration.java 文件源码 项目:Camel 阅读 36 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(DigitalSignatureComponent.class)
public DigitalSignatureComponent configureDigitalSignatureComponent(
        CamelContext camelContext,
        DigitalSignatureComponentConfiguration configuration)
        throws Exception {
    DigitalSignatureComponent component = new DigitalSignatureComponent();
    component.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), component, parameters);
    return component;
}
XMLSecurityDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 42 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XMLSecurityDataFormat.class)
public XMLSecurityDataFormat configureXMLSecurityDataFormat(
        CamelContext camelContext,
        XMLSecurityDataFormatConfiguration configuration) throws Exception {
    XMLSecurityDataFormat dataformat = new XMLSecurityDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
UniVocityTsvDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 41 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(UniVocityTsvDataFormat.class)
public UniVocityTsvDataFormat configureUniVocityTsvDataFormat(
        CamelContext camelContext,
        UniVocityTsvDataFormatConfiguration configuration) throws Exception {
    UniVocityTsvDataFormat dataformat = new UniVocityTsvDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
UniVocityCsvDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 36 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(UniVocityCsvDataFormat.class)
public UniVocityCsvDataFormat configureUniVocityCsvDataFormat(
        CamelContext camelContext,
        UniVocityCsvDataFormatConfiguration configuration) throws Exception {
    UniVocityCsvDataFormat dataformat = new UniVocityCsvDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
XmlJsonDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 39 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XmlJsonDataFormat.class)
public XmlJsonDataFormat configureXmlJsonDataFormat(
        CamelContext camelContext,
        XmlJsonDataFormatConfiguration configuration) throws Exception {
    XmlJsonDataFormat dataformat = new XmlJsonDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
BoonDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 32 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BoonDataFormat.class)
public BoonDataFormat configureBoonDataFormat(CamelContext camelContext,
        BoonDataFormatConfiguration configuration) throws Exception {
    BoonDataFormat dataformat = new BoonDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
SyslogDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 43 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SyslogDataFormat.class)
public SyslogDataFormat configureSyslogDataFormat(
        CamelContext camelContext,
        SyslogDataFormatConfiguration configuration) throws Exception {
    SyslogDataFormat dataformat = new SyslogDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
JacksonDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 34 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JacksonDataFormat.class)
public JacksonDataFormat configureJacksonDataFormat(
        CamelContext camelContext,
        JacksonDataFormatConfiguration configuration) throws Exception {
    JacksonDataFormat dataformat = new JacksonDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
HessianDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 41 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(HessianDataFormat.class)
public HessianDataFormat configureHessianDataFormat(
        CamelContext camelContext,
        HessianDataFormatConfiguration configuration) throws Exception {
    HessianDataFormat dataformat = new HessianDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
AvroDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 36 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(AvroDataFormat.class)
public AvroDataFormat configureAvroDataFormat(CamelContext camelContext,
        AvroDataFormatConfiguration configuration) throws Exception {
    AvroDataFormat dataformat = new AvroDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
BindyKeyValuePairDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 41 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BindyKeyValuePairDataFormat.class)
public BindyKeyValuePairDataFormat configureBindyKeyValuePairDataFormat(
        CamelContext camelContext,
        BindyKeyValuePairDataFormatConfiguration configuration)
        throws Exception {
    BindyKeyValuePairDataFormat dataformat = new BindyKeyValuePairDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
JibxDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 29 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JibxDataFormat.class)
public JibxDataFormat configureJibxDataFormat(CamelContext camelContext,
        JibxDataFormatConfiguration configuration) throws Exception {
    JibxDataFormat dataformat = new JibxDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
CryptoDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 40 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CryptoDataFormat.class)
public CryptoDataFormat configureCryptoDataFormat(
        CamelContext camelContext,
        CryptoDataFormatConfiguration configuration) throws Exception {
    CryptoDataFormat dataformat = new CryptoDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
GoogleCalendarComponentAutoConfiguration.java 文件源码 项目:Camel 阅读 41 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(GoogleCalendarComponent.class)
public GoogleCalendarComponent configureGoogleCalendarComponent(
        CamelContext camelContext,
        GoogleCalendarComponentConfiguration configuration)
        throws Exception {
    GoogleCalendarComponent component = new GoogleCalendarComponent();
    component.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), component, parameters);
    return component;
}
BindyFixedLengthDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 39 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BindyFixedLengthDataFormat.class)
public BindyFixedLengthDataFormat configureBindyFixedLengthDataFormat(
        CamelContext camelContext,
        BindyFixedLengthDataFormatConfiguration configuration)
        throws Exception {
    BindyFixedLengthDataFormat dataformat = new BindyFixedLengthDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
TidyMarkupDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 34 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(TidyMarkupDataFormat.class)
public TidyMarkupDataFormat configureTidyMarkupDataFormat(
        CamelContext camelContext,
        TidyMarkupDataFormatConfiguration configuration) throws Exception {
    TidyMarkupDataFormat dataformat = new TidyMarkupDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
SnakeYAMLDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 32 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(SnakeYAMLDataFormat.class)
public SnakeYAMLDataFormat configureSnakeYAMLDataFormat(
        CamelContext camelContext,
        SnakeYAMLDataFormatConfiguration configuration) throws Exception {
    SnakeYAMLDataFormat dataformat = new SnakeYAMLDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
JacksonXMLDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 39 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(JacksonXMLDataFormat.class)
public JacksonXMLDataFormat configureJacksonXMLDataFormat(
        CamelContext camelContext,
        JacksonXMLDataFormatConfiguration configuration) throws Exception {
    JacksonXMLDataFormat dataformat = new JacksonXMLDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
CastorDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 38 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(CastorDataFormat.class)
public CastorDataFormat configureCastorDataFormat(
        CamelContext camelContext,
        CastorDataFormatConfiguration configuration) throws Exception {
    CastorDataFormat dataformat = new CastorDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}
XmlRpcDataFormatAutoConfiguration.java 文件源码 项目:Camel 阅读 44 收藏 0 点赞 0 评论 0
@Bean
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XmlRpcDataFormat.class)
public XmlRpcDataFormat configureXmlRpcDataFormat(
        CamelContext camelContext,
        XmlRpcDataFormatConfiguration configuration) throws Exception {
    XmlRpcDataFormat dataformat = new XmlRpcDataFormat();
    if (dataformat instanceof CamelContextAware) {
        ((CamelContextAware) dataformat).setCamelContext(camelContext);
    }
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    IntrospectionSupport.setProperties(camelContext,
            camelContext.getTypeConverter(), dataformat, parameters);
    return dataformat;
}


问题


面经


文章

微信
公众号

扫码关注公众号