List of usage examples for org.springframework.context.annotation ScopedProxyMode INTERFACES
ScopedProxyMode INTERFACES
To view the source code for org.springframework.context.annotation ScopedProxyMode INTERFACES.
Click Source Link
From source file:sagan.AsciidoctorConfig.java
@Bean @Lazy @Scope(proxyMode = ScopedProxyMode.INTERFACES) public Asciidoctor asciidoctor() { return Asciidoctor.Factory.create(); }
From source file:org.zalando.example.zauth.config.ApplicationConfig.java
/** * ZAuth api, can be injected into controller if needed. * // www . j a v a2 s . com * @param repository * @return ZAuth * @see WebController */ @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ZAuth zAuth(final ConnectionRepository repository) { Connection<ZAuth> connection = repository.findPrimaryConnection(ZAuth.class); return connection != null ? connection.getApi() : null; }
From source file:org.meruvian.yama.service.social.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ConnectionRepository connectionRepository() { User user = credential.getCurrentUser(); if (user == null) return null; return usersConnectionRepository.createConnectionRepository(user.getId()); }
From source file:com.captaindebug.social.twittertimeline.SimpleTwitterConfig.java
/** * A proxy to a request-scoped object representing the simplest Twitter API - one that * doesn't need any authorization/*from w ww .j a v a2 s .c om*/ */ @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Twitter twitter() { return twitter; }
From source file:fr.keemto.web.config.ConnectionRepositoryConfig.java
@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"); }/*from w w w . j a v a2 s . c om*/ String username = authentication.getName(); ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository(username); return new ObservableConnectionRepository(username, connectionRepository, accountInterceptor); }
From source file:org.vaadin.spring.events.config.EventBusConfiguration.java
@Bean @Scope(value = VaadinSessionScope.VAADIN_SESSION_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES) @EventBusProxy EventBus.SessionEventBus proxiedSessionEventBus() { return sessionEventBus(); }
From source file:org.wte4j.ui.server.config.Wte4jAdminConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public ServiceContext serviceContext() { return new SimpleServiceContext(); }
From source file:org.trustedanalytics.datasetpublisher.Config.java
@Bean @Scope(value = SCOPE_REQUEST, proxyMode = ScopedProxyMode.INTERFACES) public JwtToken userIdentity(AuthTokenRetriever tokenRetriever) { final Authentication auth = SecurityContextHolder.getContext().getAuthentication(); return new TapOauthToken(tokenRetriever.getAuthToken(auth)); }
From source file:org.vaadin.spring.events.config.EventBusConfiguration.java
@Bean @Scope(value = UIScopeImpl.VAADIN_UI_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES) @EventBusProxy EventBus.UIEventBus proxiedUiEventBus() { return uiEventBus(); }
From source file:org.vaadin.spring.events.config.VaadinEventbusConfiguration.java
@Bean @Scope(value = VaadinUIScope.VAADIN_UI_SCOPE_NAME, proxyMode = ScopedProxyMode.INTERFACES) @EventBusProxy EventBus.UIEventBus proxiedUiEventBus() { return uiEventBus(); }