org.springframework.beans.factory.config.CustomScopeConfigurer#addScope ( )源码实例Demo

下面列出了org.springframework.beans.factory.config.CustomScopeConfigurer#addScope ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: joinfaces   文件: ViewScopeAutoConfiguration.java
@Bean
@ConditionalOnProperty(value = "joinfaces.view-scope.enabled", havingValue = "true", matchIfMissing = true)
public static CustomScopeConfigurer viewScopeConfigurer() {
	CustomScopeConfigurer customScopeConfigurer = new CustomScopeConfigurer();
	customScopeConfigurer.addScope(ViewScope.SCOPE_VIEW, new ViewScope());
	return customScopeConfigurer;
}
 
@Bean
public static CustomScopeConfigurer testScopeConfigurer() {
	CustomScopeConfigurer customScopeConfigurer = new CustomScopeConfigurer();

	customScopeConfigurer.addScope("test", new TestScope());

	return customScopeConfigurer;
}
 
@Bean(name = "customScopeConfigurer")
public static CustomScopeConfigurer createClientScope(final ClientSession clientSession) {
    Assert.requireNonNull(clientSession, "clientSession");
    CustomScopeConfigurer configurer = new CustomScopeConfigurer();
    configurer.addScope(ClientScopeImpl.CLIENT_SCOPE, new TestClientScope(clientSession));
    return configurer;
}
 
源代码4 项目: fiware-cepheus   文件: TenantConfiguration.java
/**
 * Declare the "tenant" scope.
 */
@Bean
public static CustomScopeConfigurer customScopeConfigurer (TenantScope tenantScope) {
    CustomScopeConfigurer configurer = new CustomScopeConfigurer ();
    configurer.addScope("tenant", tenantScope);
    return configurer;
}
 
@Bean
public static CustomScopeConfigurer webSocketScopeConfigurer() {
	CustomScopeConfigurer configurer = new CustomScopeConfigurer();
	configurer.addScope("websocket", new SimpSessionScope());
	return configurer;
}
 
@Bean
public static CustomScopeConfigurer webSocketScopeConfigurer() {
	CustomScopeConfigurer configurer = new CustomScopeConfigurer();
	configurer.addScope("websocket", new SimpSessionScope());
	return configurer;
}
 
@Bean
public static CustomScopeConfigurer webSocketScopeConfigurer() {
	CustomScopeConfigurer configurer = new CustomScopeConfigurer();
	configurer.addScope("websocket", new SimpSessionScope());
	return configurer;
}
 
源代码8 项目: dolphin-platform   文件: SpringBeanFactory.java
@Bean(name = "customScopeConfigurer")
public static CustomScopeConfigurer createClientScope() {
    final CustomScopeConfigurer configurer = new CustomScopeConfigurer();
    configurer.addScope(ClientScopeImpl.CLIENT_SCOPE, new ClientScopeImpl());
    return configurer;
}
 
源代码9 项目: tutorials   文件: TestConfig.java
@Bean
public CustomScopeConfigurer customScopeConfigurer() {
    CustomScopeConfigurer configurer = new CustomScopeConfigurer();
    configurer.addScope("session", new SimpleThreadScope());
    return configurer;
}