Java 类org.springframework.boot.autoconfigure.condition.ConditionalOnSingleCandidate 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:InfoContributorAutoConfiguration.java   
@Bean
@ConditionalOnEnabledInfoContributor("git")
@ConditionalOnSingleCandidate(GitProperties.class)
@ConditionalOnMissingBean
@Order(DEFAULT_ORDER)
public GitInfoContributor gitInfoContributor(GitProperties gitProperties) {
    return new GitInfoContributor(gitProperties, this.properties.getGit().getMode());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:InfoContributorAutoConfiguration.java   
@Bean
@ConditionalOnEnabledInfoContributor("build")
@ConditionalOnSingleCandidate(BuildProperties.class)
@Order(DEFAULT_ORDER)
public InfoContributor buildInfoContributor(BuildProperties buildProperties) {
    return new BuildInfoContributor(buildProperties);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RabbitAutoConfiguration.java   
@Bean
@ConditionalOnSingleCandidate(ConnectionFactory.class)
@ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic", matchIfMissing = true)
@ConditionalOnMissingBean(AmqpAdmin.class)
public AmqpAdmin amqpAdmin(ConnectionFactory connectionFactory) {
    return new RabbitAdmin(connectionFactory);
}
项目:spring-boot-concourse    文件:InfoContributorAutoConfiguration.java   
@Bean
@ConditionalOnEnabledInfoContributor("git")
@ConditionalOnSingleCandidate(GitProperties.class)
@ConditionalOnMissingBean
@Order(DEFAULT_ORDER)
public GitInfoContributor gitInfoContributor(GitProperties gitProperties) {
    return new GitInfoContributor(gitProperties, this.properties.getGit().getMode());
}
项目:spring-boot-concourse    文件:InfoContributorAutoConfiguration.java   
@Bean
@ConditionalOnEnabledInfoContributor("build")
@ConditionalOnSingleCandidate(BuildProperties.class)
@Order(DEFAULT_ORDER)
public InfoContributor buildInfoContributor(BuildProperties buildProperties) {
    return new BuildInfoContributor(buildProperties);
}
项目:spring-boot-concourse    文件:RabbitAutoConfiguration.java   
@Bean
@ConditionalOnSingleCandidate(ConnectionFactory.class)
@ConditionalOnProperty(prefix = "spring.rabbitmq", name = "dynamic", matchIfMissing = true)
@ConditionalOnMissingBean(AmqpAdmin.class)
public AmqpAdmin amqpAdmin(ConnectionFactory connectionFactory) {
    return new RabbitAdmin(connectionFactory);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:JmsAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
@ConditionalOnSingleCandidate(JmsTemplate.class)
public JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) {
    return new JmsMessagingTemplate(jmsTemplate);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:RabbitAutoConfiguration.java   
@Bean
@ConditionalOnSingleCandidate(RabbitTemplate.class)
public RabbitMessagingTemplate rabbitMessagingTemplate(
        RabbitTemplate rabbitTemplate) {
    return new RabbitMessagingTemplate(rabbitTemplate);
}
项目:spring-boot-concourse    文件:JmsAutoConfiguration.java   
@Bean
@ConditionalOnMissingBean
@ConditionalOnSingleCandidate(JmsTemplate.class)
public JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) {
    return new JmsMessagingTemplate(jmsTemplate);
}
项目:spring-boot-concourse    文件:RabbitAutoConfiguration.java   
@Bean
@ConditionalOnSingleCandidate(RabbitTemplate.class)
public RabbitMessagingTemplate rabbitMessagingTemplate(
        RabbitTemplate rabbitTemplate) {
    return new RabbitMessagingTemplate(rabbitTemplate);
}