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


Java ScopedProxyMode.TARGET_CLASS屬性代碼示例

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


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

示例1: linkFactoryContext

@Bean
@Scope(value = "request", proxyMode = ScopedProxyMode.TARGET_CLASS)
LinkFactoryContext linkFactoryContext(FieldCheckerForSchema fieldCheckerForSchema,
        MethodCheckerForLink methodCheckerForLink) throws URISyntaxException {

    URI baseUri = new URI("http://localhost:9998");

    return new LinkFactoryContextDefault(baseUri, methodCheckerForLink, fieldCheckerForSchema);
}
 
開發者ID:uweschaefer,項目名稱:factcast,代碼行數:9,代碼來源:SpringConfig.java

示例2: testBean

@Bean
@Lazy
@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
public AnnotationTestBean testBean() {
	AnnotationTestBean bean = new AnnotationTestBean();
	bean.setName("TEST");
	bean.setAge(100);
	return bean;
}
 
開發者ID:langtianya,項目名稱:spring4-understanding,代碼行數:9,代碼來源:EnableMBeanExportConfigurationTests.java

示例3: authorizedUser

@Bean
@Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS)
public UserDetails authorizedUser() {
    UserDetails userDetails = (UserDetails) SecurityContextHolder
            .getContext().getAuthentication().getPrincipal();

    return userDetails;
}
 
開發者ID:yo1000,項目名稱:bluefairy,代碼行數:8,代碼來源:SecurityContext.java

示例4: gatewayRestTemplate

@Bean
@Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
public OAuth2RestTemplate gatewayRestTemplate() {
	OAuth2RestTemplate template  =
			new OAuth2RestTemplate(gatewayDetails(), new DefaultOAuth2ClientContext(accessTokenRequest));
	template.setAccessTokenProvider(accessTokenProvider);
	return template;
}
 
開發者ID:ishaigor,項目名稱:rest-retro-sample,代碼行數:8,代碼來源:ClientOAuth2Configurer.java

示例5: userApprovalHandler

@Lazy
@Scope(proxyMode=ScopedProxyMode.TARGET_CLASS)
@Bean public ApprovalStoreUserApprovalHandler userApprovalHandler() throws Exception {
	ApprovalStoreUserApprovalHandler handler = new ApprovalStoreUserApprovalHandler();
	handler.setApprovalStore(approvalStore());
	handler.setRequestFactory(new DefaultOAuth2RequestFactory(clientDetailsService));
	handler.setClientDetailsService(clientDetailsService);
	return handler;
}
 
開發者ID:ishaigor,項目名稱:rest-retro-sample,代碼行數:9,代碼來源:OAuth2UserApprovalHandlerConfigurer.java

示例6: dashboardAccessTokenRequest

@Bean(name = "dashboardAccessTokenRequest")
@Scope(value = WebApplicationContext.SCOPE_REQUEST, proxyMode = ScopedProxyMode.TARGET_CLASS)
@Autowired
public AccessTokenRequest dashboardAccessTokenRequest() {
    final DefaultAccessTokenRequest request = new DefaultAccessTokenRequest(httpServletRequest.getParameterMap());

    final Object currentUri = httpServletRequest.getAttribute(OAuth2ClientContextFilter.CURRENT_URI);
    if (currentUri != null) {
        request.setCurrentUri(currentUri.toString());
    }

    return request;
}
 
開發者ID:bsblabs,項目名稱:cf-sample-service,代碼行數:13,代碼來源:DashboardSecurityConfiguration.java

示例7: dashboardResourceServerTokenServices

@Bean(name = "dashboardResourceServerTokenServices")
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
@Autowired
public ResourceServerTokenServices dashboardResourceServerTokenServices() {
    final RemoteTokenServices remoteTokenServices = new RemoteTokenServices();

    remoteTokenServices.setClientId(clientId);
    remoteTokenServices.setClientSecret(clientSecret);
    remoteTokenServices.setCheckTokenEndpointUrl(checkTokenUri);
    remoteTokenServices.setAccessTokenConverter(dashboardAccessTokenConverter());

    return remoteTokenServices;
}
 
開發者ID:bsblabs,項目名稱:cf-sample-service,代碼行數:13,代碼來源:DashboardSecurityConfiguration.java

示例8: userApprovalHandler

@Bean
@Override
@Lazy
@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
public SparklrUserApprovalHandler userApprovalHandler() throws Exception {
	SparklrUserApprovalHandler handler = new SparklrUserApprovalHandler();
	handler.setApprovalStore(approvalStore());
	handler.setRequestFactory(requestFactory);
	handler.setClientDetailsService(clientDetailsService);
	handler.setUseApprovalStore(true);
	return handler;
}
 
開發者ID:jungyang,項目名稱:oauth-client-master,代碼行數:12,代碼來源:OAuth2ServerConfig.java

示例9: awsCognitoCredentialsHolder

@Bean
@Scope(value="request", proxyMode= ScopedProxyMode.TARGET_CLASS)
public JwtIdTokenCredentialsHolder awsCognitoCredentialsHolder() {
    return new JwtIdTokenCredentialsHolder();
}
 
開發者ID:IxorTalk,項目名稱:ixortalk.aws.cognito.jwt.security.filter,代碼行數:5,代碼來源:JwtAutoConfiguration.java

示例10: awsCognitoCredentialsHolder

@Bean
@Scope(value="request", proxyMode= ScopedProxyMode.TARGET_CLASS)
public AwsCognitoCredentialsHolder awsCognitoCredentialsHolder() {
    return new AwsCognitoCredentialsHolder();
}
 
開發者ID:IxorTalk,項目名稱:ixortalk.aws.cognito.jwt.security.filter,代碼行數:5,代碼來源:AwsCognitoAutoConfiguration.java

示例11: getSession

@Bean
@Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
public Session getSession() throws Exception {
    return super.getSession();
}
 
開發者ID:chaokunyang,項目名稱:microservices-event-sourcing,代碼行數:5,代碼來源:GraphConfiguration.java

示例12: testBean1

@Bean @Qualifier("interesting") @Scope(value="prototype", proxyMode=ScopedProxyMode.TARGET_CLASS)
public TestBean testBean1() {
	return new TestBean("interesting");
}
 
開發者ID:langtianya,項目名稱:spring4-understanding,代碼行數:4,代碼來源:BeanMethodQualificationTests.java

示例13: testBean2

@Bean @Boring @Scope(value="prototype", proxyMode=ScopedProxyMode.TARGET_CLASS)
public TestBean testBean2() {
	return new TestBean("boring");
}
 
開發者ID:langtianya,項目名稱:spring4-understanding,代碼行數:4,代碼來源:BeanMethodQualificationTests.java

示例14: foo

@Bean
@Scope(value = "myTestScope",  proxyMode = ScopedProxyMode.TARGET_CLASS)
@Override
public Foo foo() {
	return new Foo();
}
 
開發者ID:langtianya,項目名稱:spring4-understanding,代碼行數:6,代碼來源:Spr10744Tests.java

示例15: requestScopedInstance

@Bean @Scope(value = "request", proxyMode = ScopedProxyMode.TARGET_CLASS)
public TestBean requestScopedInstance() {
	return new TestBean("requestScopedInstance", 3);
}
 
開發者ID:langtianya,項目名稱:spring4-understanding,代碼行數:4,代碼來源:FactoryMethodComponent.java


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