org.springframework.context.annotation.Bean.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(156)

本文整理了Java中org.springframework.context.annotation.Bean.<init>()方法的一些代码示例,展示了Bean.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bean.<init>()方法的具体详情如下:
包路径:org.springframework.context.annotation.Bean
类名称:Bean
方法名:<init>

Bean.<init>介绍

暂无

代码示例

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(LogoutHandler.class)
public LogoutHandler logoutHandler() {
 return new DefaultLogoutHandler();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(UserInfoHolder.class)
public UserInfoHolder springSecurityUserInfoHolder() {
 return new SpringSecurityUserInfoHolder();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(UserInfoHolder.class)
public DefaultUserInfoHolder defaultUserInfoHolder() {
 return new DefaultUserInfoHolder();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
 @ConditionalOnMissingBean(UserService.class)
 public UserService defaultUserService() {
  return new DefaultUserService();
 }
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(UserInfoHolder.class)
public UserInfoHolder springSecurityUserInfoHolder() {
 return new SpringSecurityUserInfoHolder();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(SsoHeartbeatHandler.class)
public SsoHeartbeatHandler defaultSsoHeartbeatHandler() {
 return new DefaultSsoHeartbeatHandler();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(UserService.class)
public UserService springSecurityUserService() {
 return new LdapUserService();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(SsoHeartbeatHandler.class)
public SsoHeartbeatHandler defaultSsoHeartbeatHandler() {
 return new DefaultSsoHeartbeatHandler();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(LogoutHandler.class)
public DefaultLogoutHandler logoutHandler() {
 return new DefaultLogoutHandler();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(UserService.class)
public UserService springSecurityUserService() {
 return new SpringSecurityUserService();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(SsoHeartbeatHandler.class)
public SsoHeartbeatHandler defaultSsoHeartbeatHandler() {
 return new DefaultSsoHeartbeatHandler();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
@ConditionalOnMissingBean(LogoutHandler.class)
public LogoutHandler logoutHandler() {
 return new DefaultLogoutHandler();
}

代码示例来源:origin: ctripcorp/apollo

@Bean
 @ConditionalOnMissingBean(EmailService.class)
 public EmailService defaultEmailService() {
  return new DefaultEmailService();
 }
}

代码示例来源:origin: redisson/redisson

@Bean
@ConditionalOnMissingBean(RedisConnectionFactory.class)
public RedissonConnectionFactory redissonConnectionFactory(RedissonClient redisson) {
  return new RedissonConnectionFactory(redisson);
}

代码示例来源:origin: codecentric/spring-boot-admin

@Bean
  @ConditionalOnMissingBean(InstanceEventStore.class)
  public HazelcastEventStore eventStore(HazelcastInstance hazelcastInstance) {
    IMap<InstanceId, List<InstanceEvent>> map = hazelcastInstance.getMap(mapName);
    return new HazelcastEventStore(map);
  }
}

代码示例来源:origin: codecentric/spring-boot-admin

@Bean
  @ConditionalOnMissingBean
  public StartupDateMetadataContributor startupDateMetadataContributor() {
    return new StartupDateMetadataContributor();
  }
}

代码示例来源:origin: codecentric/spring-boot-admin

@Bean
@ConditionalOnMissingBean
public ApplicationsController applicationsController(InstanceRegistry instanceRegistry,
                           InstanceEventPublisher eventPublisher) {
  return new ApplicationsController(instanceRegistry, eventPublisher);
}

代码示例来源:origin: codecentric/spring-boot-admin

@Bean(initMethod = "start", destroyMethod = "stop")
  @ConditionalOnMissingBean
  public NotificationTrigger notificationTrigger(Notifier notifier, Publisher<InstanceEvent> events) {
    return new NotificationTrigger(notifier, events);
  }
}

代码示例来源:origin: codecentric/spring-boot-admin

@Bean
  @ConditionalOnMissingBean
  @ConfigurationProperties("spring.boot.admin.notify.letschat")
  public LetsChatNotifier letsChatNotifier(InstanceRepository repository) {
    return new LetsChatNotifier(repository);
  }
}

代码示例来源:origin: codecentric/spring-boot-admin

@Bean
  @ConditionalOnMissingBean
  @ConfigurationProperties("spring.boot.admin.notify.telegram")
  public TelegramNotifier telegramNotifier(InstanceRepository repository) {
    return new TelegramNotifier(repository);
  }
}

相关文章