當前位置: 首頁>>代碼示例>>Java>>正文


Java ScopedProxyMode.INTERFACES屬性代碼示例

本文整理匯總了Java中org.springframework.context.annotation.ScopedProxyMode.INTERFACES屬性的典型用法代碼示例。如果您正苦於以下問題:Java ScopedProxyMode.INTERFACES屬性的具體用法?Java ScopedProxyMode.INTERFACES怎麽用?Java ScopedProxyMode.INTERFACES使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.springframework.context.annotation.ScopedProxyMode的用法示例。


在下文中一共展示了ScopedProxyMode.INTERFACES屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DefaultAccessTokenRequest

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public DefaultOAuth2ClientContext oauth2ClientContext() {
	DefaultOAuth2ClientContext context = new DefaultOAuth2ClientContext(
			new DefaultAccessTokenRequest());
	Authentication principal = SecurityContextHolder.getContext()
			.getAuthentication();
	if (principal instanceof OAuth2Authentication) {
		OAuth2Authentication authentication = (OAuth2Authentication) principal;
		Object details = authentication.getDetails();
		if (details instanceof OAuth2AuthenticationDetails) {
			OAuth2AuthenticationDetails oauthsDetails = (OAuth2AuthenticationDetails) details;
			String token = oauthsDetails.getTokenValue();
			context.setAccessToken(new DefaultOAuth2AccessToken(token));
		}
	}
	return context;
}
 
開發者ID:spring-projects,項目名稱:spring-security-oauth2-boot,代碼行數:18,代碼來源:OAuth2RestOperationsConfiguration.java

示例2: facebook

@Bean
@ConditionalOnMissingBean(Facebook.class)
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public Facebook facebook(ConnectionRepository repository) {
	Connection<Facebook> connection = repository
			.findPrimaryConnection(Facebook.class);
	return connection != null ? connection.getApi() : null;
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:8,代碼來源:FacebookConfiguration.java

示例3: brokerService

@Bean
@Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES)
Service brokerService() {
    if (brokerService == null) {
        try {
            BrokerService broker = new BrokerService();
            broker.setPersistent(false);
            broker.getSystemUsage().getMemoryUsage().setLimit(10*1024*10);
            broker.start();
            brokerService = broker;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
    return brokerService;
}
 
開發者ID:JumpMind,項目名稱:metl,代碼行數:16,代碼來源:AppConfig.java

示例4: google

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public Google google(final ConnectionRepository repository) {
	final Connection<Google> connection = repository
			.findPrimaryConnection(Google.class);
	return connection != null ? connection.getApi() : null;
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:7,代碼來源:GoogleConfigurerAdapter.java

示例5: gitHub

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public GitHub gitHub(ConnectionRepository repository) {
	Connection<GitHub> connection = repository
			.findPrimaryConnection(GitHub.class);
	return connection != null ? connection.getApi() : null;
}
 
開發者ID:PacktPublishing,項目名稱:OAuth-2.0-Cookbook,代碼行數:7,代碼來源:GitHubConfiguration.java

示例6: owlOntology

@Bean
@Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.INTERFACES)
public OWLMutableOntology owlOntology(PrefixManager prefixManager) throws OWLOntologyCreationException {
  if (prefixManager.getDefaultPrefix() == null) {
    throw new IllegalStateException("Default ontology prefix must not be null.");
  }

  OWLOntologyManager ontologyManager = OWLManager.createOWLOntologyManager();
  // Cast to a mutable ontology to pass OWLApi's strange checks
  return (OWLMutableOntology) ontologyManager.createOntology(IRI.create(prefixManager.getDefaultPrefix()));
}
 
開發者ID:VisualDataWeb,項目名稱:OntoBench,代碼行數:11,代碼來源:OwlApiConfig.java

示例7: vkontakte

@Bean
@ConditionalOnMissingBean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public VKontakte vkontakte(ConnectionRepository repository) {
    Connection<VKontakte> connection = repository.findPrimaryConnection(VKontakte.class);
    if (connection != null) {
        return connection.getApi();
    }
    return new VKontakteTemplate();
}
 
開發者ID:saladinkzn,項目名稱:social-vkontakte-spring-boot-starter,代碼行數:10,代碼來源:VKontakteAutoConfiguration.java

示例8: twitter

@Bean
@ConditionalOnMissingBean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public Twitter twitter(ConnectionRepository repository) {
	Connection<Twitter> connection = repository
			.findPrimaryConnection(Twitter.class);
	if (connection != null) {
		return connection.getApi();
	}
	return new TwitterTemplate(this.properties.getAppId(),
			this.properties.getAppSecret());
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:12,代碼來源:TwitterAutoConfiguration.java

示例9: linkedin

@Bean
@ConditionalOnMissingBean(LinkedIn.class)
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public LinkedIn linkedin(ConnectionRepository repository) {
	Connection<LinkedIn> connection = repository
			.findPrimaryConnection(LinkedIn.class);
	return connection != null ? connection.getApi() : null;
}
 
開發者ID:vikrammane23,項目名稱:https-github.com-g0t4-jenkins2-course-spring-boot,代碼行數:8,代碼來源:LinkedInAutoConfiguration.java

示例10: wicketContextProvider

@Bean
/* Use a proxy to fix a circular dependency.
 * There's no real notion of scope here, since the bean is a singleton: we just want it to be proxyfied so that
 * the circular dependency is broken.
 */
@Scope(proxyMode = ScopedProxyMode.INTERFACES)
public IWicketContextProvider wicketContextProvider(WebApplication defaultApplication) {
	return new WicketContextProviderImpl(defaultApplication);
}
 
開發者ID:openwide-java,項目名稱:owsi-core-parent,代碼行數:9,代碼來源:AbstractWebappConfig.java

示例11: connectionRepository

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public ConnectionRepository connectionRepository() {
	Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
	if (authentication == null) {
		throw new IllegalStateException("Unable to get a ConnectionRepository: no user signed in");
	}
	return usersConnectionRepository().createConnectionRepository(authentication.getName());
}
 
開發者ID:kevindeyne,項目名稱:simple-facebook-integration-spring-sec,代碼行數:9,代碼來源:WebSecurityConfig.java

示例12: facebook

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public Facebook facebook(ConnectionRepository repository) {
    log.debug("Connection from " + Facebook.class);
    Connection<Facebook> connection = repository.findPrimaryConnection(Facebook.class);
    return connection != null ? connection.getApi() : null;
}
 
開發者ID:esutoniagodesu,項目名稱:egd-web,代碼行數:7,代碼來源:SocialConfig.java

示例13: google

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES)
public Google google(ConnectionRepository repository) {
    log.debug("Connection from " + Google.class);
    Connection<Google> connection = repository.findPrimaryConnection(Google.class);
    return connection != null ? connection.getApi() : null;
}
 
開發者ID:esutoniagodesu,項目名稱:egd-web,代碼行數:7,代碼來源:SocialConfig.java

示例14: executionDatabasePlatform

@Bean
@Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES)
public IDatabasePlatform executionDatabasePlatform() {
    if (executionDatabasePlatform == null) {
        executionDatabasePlatform = JdbcDatabasePlatformFactory.createNewPlatformInstance(executionDataSource(),
                new SqlTemplateSettings(), false, false);
    }
    return executionDatabasePlatform;
}
 
開發者ID:JumpMind,項目名稱:metl,代碼行數:9,代碼來源:AppConfig.java

示例15: configurationService

@Bean
@Scope(value = "singleton", proxyMode = ScopedProxyMode.INTERFACES)
public IConfigurationService configurationService() {
    if (configurationService == null) {
        configurationService = new AuditableConfigurationService(operationsService(), securityService(), configDatabasePlatform(),
                persistenceManager(), tablePrefix());
    }
    return configurationService;
}
 
開發者ID:JumpMind,項目名稱:metl,代碼行數:9,代碼來源:AppConfig.java


注:本文中的org.springframework.context.annotation.ScopedProxyMode.INTERFACES屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。