List of usage examples for org.springframework.context.annotation ScopedProxyMode TARGET_CLASS
ScopedProxyMode TARGET_CLASS
To view the source code for org.springframework.context.annotation ScopedProxyMode TARGET_CLASS.
Click Source Link
From source file:com.orange.cepheus.cep.tenant.TenantConfiguration.java
@Bean @Scope(value = "tenant", proxyMode = ScopedProxyMode.TARGET_CLASS) SubscriptionManager subscriptionManager() { return new SubscriptionManager(); }
From source file:br.com.hyperclass.snackbar.config.SnackBarConfig.java
@Bean @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS) public Order getOrder() { return new Order(getMenu()); }
From source file:org.shaigor.rest.retro.security.gateway.config.OAuth2UserApprovalHandlerConfigurer.java
@Lazy @Scope(proxyMode = ScopedProxyMode.TARGET_CLASS) @Bean// ww w . j a v a 2s . co m public ApprovalStoreUserApprovalHandler userApprovalHandler() throws Exception { ApprovalStoreUserApprovalHandler handler = new ApprovalStoreUserApprovalHandler(); handler.setApprovalStore(approvalStore()); handler.setRequestFactory(new DefaultOAuth2RequestFactory(clientDetailsService)); handler.setClientDetailsService(clientDetailsService); return handler; }
From source file:org.homiefund.test.config.IntegrationConfiguration.java
@Bean @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public UserPreferencesBean pageModel() { return new UserPreferencesBean(); }
From source file:com.seajas.search.codex.social.interceptor.FacebookConnectInterceptor.java
/** * Set the currentConnectionRepository on a per-request basis. * /* w ww .ja va2s .c o m*/ * @param currentConnectionRepository */ @Autowired @Scope(value = "request", proxyMode = ScopedProxyMode.TARGET_CLASS) public void setCurrentConnectionRepository(final ConnectionRepository currentConnectionRepository) { this.currentConnectionRepository = currentConnectionRepository; }
From source file:com.orange.clara.cloud.services.sandbox.ElpaasoSandboxServiceApplication.java
@Bean(name = "cloudFoundryClientAsUser") @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public CloudFoundryClient getCloudFoundryClientAsUser() { LOGGER.debug("Creating new CloudFoundry client using access token"); CloudCredentials credentials = new CloudCredentials(getOAuth2AccessToken(), false); return new CloudFoundryClient(credentials, cloudfoundryTarget.getApiUrl(), cloudfoundryTarget.isTrustSelfSignedCerts()); }
From source file:com.javaetmoi.sample.config.SecurityConfig.java
/** * Authenticated user information available as a proxified Spring bean. * //from w w w .j a va2 s . c o m * <p>Could be inject into beans of scope singleton (ie. @Service or @Controler) */ @Bean @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public UserDetails authenticatedUserDetails() { SecurityContextHolder.getContext().getAuthentication(); Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication != null) { if (authentication instanceof UsernamePasswordAuthenticationToken) { return (UserDetails) ((UsernamePasswordAuthenticationToken) authentication).getPrincipal(); } if (authentication instanceof RememberMeAuthenticationToken) { return (UserDetails) ((RememberMeAuthenticationToken) authentication).getPrincipal(); } } return null; }
From source file:org.pavlov.springmvcjavaconfig.config.WebConfig.java
@Bean @Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS) public User user() { // User user = new User(); // user.setUserName("Kaka"); return new User(); }
From source file:com.xumpy.security.servlet.DispatcherConfig.java
@Bean @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS) public OverzichtGroepBedragenTotal overzichtGroepBedragenTotal() { return new OverzichtGroepBedragenTotal(); }
From source file:org.meruvian.yama.webapi.config.SocialConfig.java
@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.TARGET_CLASS) public SocialConnectionService connectionRepository(SocialUsersConnectionService usersConnectionRepository) { User user = SessionCredentials.getCurrentUser(); if (user == null) return null; return usersConnectionRepository.createConnectionRepository(user.getId()); }