39
39
import com .nimbusds .jose .crypto .RSASSASigner ;
40
40
import com .nimbusds .jose .jwk .JWKSet ;
41
41
import com .nimbusds .jose .jwk .RSAKey ;
42
+ import com .nimbusds .jose .util .JSONObjectUtils ;
42
43
import jakarta .annotation .PreDestroy ;
43
44
import jakarta .servlet .http .HttpServletRequest ;
44
45
import net .minidev .json .JSONObject ;
62
63
import org .springframework .context .annotation .Bean ;
63
64
import org .springframework .context .annotation .Configuration ;
64
65
import org .springframework .context .support .GenericApplicationContext ;
66
+ import org .springframework .core .ParameterizedTypeReference ;
65
67
import org .springframework .core .convert .converter .Converter ;
66
68
import org .springframework .core .env .ConfigurableEnvironment ;
67
69
import org .springframework .core .env .Environment ;
@@ -217,7 +219,7 @@ public class OAuth2ResourceServerConfigurerTests {
217
219
@ Test
218
220
public void getWhenUsingDefaultsWithValidBearerTokenThenAcceptsRequest () throws Exception {
219
221
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
220
- mockRestOperations (jwks ("Default" ));
222
+ mockJwksRestOperations (jwks ("Default" ));
221
223
String token = this .token ("ValidNoScopes" );
222
224
// @formatter:off
223
225
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -232,7 +234,7 @@ public void getWhenCustomSecurityContextHolderStrategyThenUses() throws Exceptio
232
234
.register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ,
233
235
SecurityContextChangedListenerConfig .class )
234
236
.autowire ();
235
- mockRestOperations (jwks ("Default" ));
237
+ mockJwksRestOperations (jwks ("Default" ));
236
238
String token = this .token ("ValidNoScopes" );
237
239
// @formatter:off
238
240
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -248,7 +250,7 @@ public void getWhenSecurityContextHolderStrategyThenUses() throws Exception {
248
250
.register (RestOperationsConfig .class , DefaultConfig .class , SecurityContextChangedListenerConfig .class ,
249
251
BasicController .class )
250
252
.autowire ();
251
- mockRestOperations (jwks ("Default" ));
253
+ mockJwksRestOperations (jwks ("Default" ));
252
254
String token = this .token ("ValidNoScopes" );
253
255
// @formatter:off
254
256
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -261,7 +263,7 @@ public void getWhenSecurityContextHolderStrategyThenUses() throws Exception {
261
263
@ Test
262
264
public void getWhenUsingDefaultsInLambdaWithValidBearerTokenThenAcceptsRequest () throws Exception {
263
265
this .spring .register (RestOperationsConfig .class , DefaultInLambdaConfig .class , BasicController .class ).autowire ();
264
- mockRestOperations (jwks ("Default" ));
266
+ mockJwksRestOperations (jwks ("Default" ));
265
267
String token = this .token ("ValidNoScopes" );
266
268
// @formatter:off
267
269
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -297,7 +299,7 @@ public void getWhenUsingJwkSetUriInLambdaThenAcceptsRequest() throws Exception {
297
299
@ Test
298
300
public void getWhenUsingDefaultsWithExpiredBearerTokenThenInvalidToken () throws Exception {
299
301
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
300
- mockRestOperations (jwks ("Default" ));
302
+ mockJwksRestOperations (jwks ("Default" ));
301
303
String token = this .token ("Expired" );
302
304
// @formatter:off
303
305
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -341,7 +343,7 @@ public void getWhenUsingDefaultsWithMalformedBearerTokenThenInvalidToken() throw
341
343
@ Test
342
344
public void getWhenUsingDefaultsWithMalformedPayloadThenInvalidToken () throws Exception {
343
345
this .spring .register (RestOperationsConfig .class , DefaultConfig .class ).autowire ();
344
- mockRestOperations (jwks ("Default" ));
346
+ mockJwksRestOperations (jwks ("Default" ));
345
347
String token = this .token ("MalformedPayload" );
346
348
// @formatter:off
347
349
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -364,7 +366,7 @@ public void getWhenUsingDefaultsWithUnsignedBearerTokenThenInvalidToken() throws
364
366
@ Test
365
367
public void getWhenUsingDefaultsWithBearerTokenBeforeNotBeforeThenInvalidToken () throws Exception {
366
368
this .spring .register (RestOperationsConfig .class , DefaultConfig .class ).autowire ();
367
- this .mockRestOperations (jwks ("Default" ));
369
+ this .mockJwksRestOperations (jwks ("Default" ));
368
370
String token = this .token ("TooEarly" );
369
371
// @formatter:off
370
372
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -421,7 +423,7 @@ public void postWhenCsrfDisabledWithBearerTokenAsFormParameterThenIgnoresToken()
421
423
@ Test
422
424
public void getWhenAnonymousDisabledThenAllows () throws Exception {
423
425
this .spring .register (RestOperationsConfig .class , AnonymousDisabledConfig .class ).autowire ();
424
- mockRestOperations (jwks ("Default" ));
426
+ mockJwksRestOperations (jwks ("Default" ));
425
427
String token = token ("ValidNoScopes" );
426
428
// @formatter:off
427
429
this .mvc .perform (get ("/authenticated" ).with (bearerToken (token )))
@@ -442,7 +444,7 @@ public void getWhenUsingDefaultsWithNoBearerTokenThenUnauthorized() throws Excep
442
444
@ Test
443
445
public void getWhenUsingDefaultsWithSufficientlyScopedBearerTokenThenAcceptsRequest () throws Exception {
444
446
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
445
- mockRestOperations (jwks ("Default" ));
447
+ mockJwksRestOperations (jwks ("Default" ));
446
448
String token = this .token ("ValidMessageReadScope" );
447
449
// @formatter:off
448
450
this .mvc .perform (get ("/requires-read-scope" ).with (bearerToken (token )))
@@ -454,7 +456,7 @@ public void getWhenUsingDefaultsWithSufficientlyScopedBearerTokenThenAcceptsRequ
454
456
@ Test
455
457
public void getWhenUsingDefaultsWithInsufficientScopeThenInsufficientScopeError () throws Exception {
456
458
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
457
- mockRestOperations (jwks ("Default" ));
459
+ mockJwksRestOperations (jwks ("Default" ));
458
460
String token = this .token ("ValidNoScopes" );
459
461
// @formatter:off
460
462
this .mvc .perform (get ("/requires-read-scope" ).with (bearerToken (token )))
@@ -466,7 +468,7 @@ public void getWhenUsingDefaultsWithInsufficientScopeThenInsufficientScopeError(
466
468
@ Test
467
469
public void getWhenUsingDefaultsWithInsufficientScpThenInsufficientScopeError () throws Exception {
468
470
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
469
- mockRestOperations (jwks ("Default" ));
471
+ mockJwksRestOperations (jwks ("Default" ));
470
472
String token = this .token ("ValidMessageWriteScp" );
471
473
// @formatter:off
472
474
this .mvc .perform (get ("/requires-read-scope" ).with (bearerToken (token )))
@@ -478,7 +480,7 @@ public void getWhenUsingDefaultsWithInsufficientScpThenInsufficientScopeError()
478
480
@ Test
479
481
public void getWhenUsingDefaultsAndAuthorizationServerHasNoMatchingKeyThenInvalidToken () throws Exception {
480
482
this .spring .register (RestOperationsConfig .class , DefaultConfig .class ).autowire ();
481
- mockRestOperations (jwks ("Empty" ));
483
+ mockJwksRestOperations (jwks ("Empty" ));
482
484
String token = this .token ("ValidNoScopes" );
483
485
// @formatter:off
484
486
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -490,7 +492,7 @@ public void getWhenUsingDefaultsAndAuthorizationServerHasNoMatchingKeyThenInvali
490
492
@ Test
491
493
public void getWhenUsingDefaultsAndAuthorizationServerHasMultipleMatchingKeysThenOk () throws Exception {
492
494
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
493
- mockRestOperations (jwks ("TwoKeys" ));
495
+ mockJwksRestOperations (jwks ("TwoKeys" ));
494
496
String token = this .token ("ValidNoScopes" );
495
497
// @formatter:off
496
498
this .mvc .perform (get ("/authenticated" ).with (bearerToken (token )))
@@ -502,7 +504,7 @@ public void getWhenUsingDefaultsAndAuthorizationServerHasMultipleMatchingKeysThe
502
504
@ Test
503
505
public void getWhenUsingDefaultsAndKeyMatchesByKidThenOk () throws Exception {
504
506
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
505
- mockRestOperations (jwks ("TwoKeys" ));
507
+ mockJwksRestOperations (jwks ("TwoKeys" ));
506
508
String token = this .token ("Kid" );
507
509
// @formatter:off
508
510
this .mvc .perform (get ("/authenticated" ).with (bearerToken (token )))
@@ -514,7 +516,7 @@ public void getWhenUsingDefaultsAndKeyMatchesByKidThenOk() throws Exception {
514
516
@ Test
515
517
public void getWhenUsingMethodSecurityWithValidBearerTokenThenAcceptsRequest () throws Exception {
516
518
this .spring .register (RestOperationsConfig .class , MethodSecurityConfig .class , BasicController .class ).autowire ();
517
- mockRestOperations (jwks ("Default" ));
519
+ mockJwksRestOperations (jwks ("Default" ));
518
520
String token = this .token ("ValidMessageReadScope" );
519
521
// @formatter:off
520
522
this .mvc .perform (get ("/ms-requires-read-scope" ).with (bearerToken (token )))
@@ -526,7 +528,7 @@ public void getWhenUsingMethodSecurityWithValidBearerTokenThenAcceptsRequest() t
526
528
@ Test
527
529
public void getWhenUsingMethodSecurityWithValidBearerTokenHavingScpAttributeThenAcceptsRequest () throws Exception {
528
530
this .spring .register (RestOperationsConfig .class , MethodSecurityConfig .class , BasicController .class ).autowire ();
529
- mockRestOperations (jwks ("Default" ));
531
+ mockJwksRestOperations (jwks ("Default" ));
530
532
String token = this .token ("ValidMessageReadScp" );
531
533
// @formatter:off
532
534
this .mvc .perform (get ("/ms-requires-read-scope" ).with (bearerToken (token )))
@@ -538,7 +540,7 @@ public void getWhenUsingMethodSecurityWithValidBearerTokenHavingScpAttributeThen
538
540
@ Test
539
541
public void getWhenUsingMethodSecurityWithInsufficientScopeThenInsufficientScopeError () throws Exception {
540
542
this .spring .register (RestOperationsConfig .class , MethodSecurityConfig .class , BasicController .class ).autowire ();
541
- mockRestOperations (jwks ("Default" ));
543
+ mockJwksRestOperations (jwks ("Default" ));
542
544
String token = this .token ("ValidNoScopes" );
543
545
// @formatter:off
544
546
this .mvc .perform (get ("/ms-requires-read-scope" ).with (bearerToken (token )))
@@ -550,7 +552,7 @@ public void getWhenUsingMethodSecurityWithInsufficientScopeThenInsufficientScope
550
552
@ Test
551
553
public void getWhenUsingMethodSecurityWithInsufficientScpThenInsufficientScopeError () throws Exception {
552
554
this .spring .register (RestOperationsConfig .class , MethodSecurityConfig .class , BasicController .class ).autowire ();
553
- mockRestOperations (jwks ("Default" ));
555
+ mockJwksRestOperations (jwks ("Default" ));
554
556
String token = this .token ("ValidMessageWriteScp" );
555
557
// @formatter:off
556
558
this .mvc .perform (get ("/ms-requires-read-scope" ).with (bearerToken (token )))
@@ -562,7 +564,7 @@ public void getWhenUsingMethodSecurityWithInsufficientScpThenInsufficientScopeEr
562
564
@ Test
563
565
public void getWhenUsingMethodSecurityWithDenyAllThenInsufficientScopeError () throws Exception {
564
566
this .spring .register (RestOperationsConfig .class , MethodSecurityConfig .class , BasicController .class ).autowire ();
565
- mockRestOperations (jwks ("Default" ));
567
+ mockJwksRestOperations (jwks ("Default" ));
566
568
String token = this .token ("ValidMessageReadScope" );
567
569
// @formatter:off
568
570
this .mvc .perform (get ("/ms-deny" ).with (bearerToken (token )))
@@ -574,7 +576,7 @@ public void getWhenUsingMethodSecurityWithDenyAllThenInsufficientScopeError() th
574
576
@ Test
575
577
public void postWhenUsingDefaultsWithValidBearerTokenAndNoCsrfTokenThenOk () throws Exception {
576
578
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
577
- mockRestOperations (jwks ("Default" ));
579
+ mockJwksRestOperations (jwks ("Default" ));
578
580
String token = this .token ("ValidNoScopes" );
579
581
// @formatter:off
580
582
this .mvc .perform (post ("/authenticated" ).header (HttpHeaders .CONTENT_TYPE , MediaType .APPLICATION_FORM_URLENCODED_VALUE ).with (bearerToken (token )))
@@ -596,7 +598,7 @@ public void postWhenUsingDefaultsWithNoBearerTokenThenCsrfDenies() throws Except
596
598
@ Test
597
599
public void postWhenUsingDefaultsWithExpiredBearerTokenAndNoCsrfThenInvalidToken () throws Exception {
598
600
this .spring .register (RestOperationsConfig .class , DefaultConfig .class ).autowire ();
599
- mockRestOperations (jwks ("Default" ));
601
+ mockJwksRestOperations (jwks ("Default" ));
600
602
String token = this .token ("Expired" );
601
603
// @formatter:off
602
604
this .mvc .perform (post ("/authenticated" ).header (HttpHeaders .CONTENT_TYPE , MediaType .APPLICATION_FORM_URLENCODED_VALUE ).with (bearerToken (token )))
@@ -608,7 +610,7 @@ public void postWhenUsingDefaultsWithExpiredBearerTokenAndNoCsrfThenInvalidToken
608
610
@ Test
609
611
public void requestWhenDefaultConfiguredThenSessionIsNotCreated () throws Exception {
610
612
this .spring .register (RestOperationsConfig .class , DefaultConfig .class , BasicController .class ).autowire ();
611
- mockRestOperations (jwks ("Default" ));
613
+ mockJwksRestOperations (jwks ("Default" ));
612
614
String token = this .token ("ValidNoScopes" );
613
615
// @formatter:off
614
616
MvcResult result = this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -621,7 +623,7 @@ public void requestWhenDefaultConfiguredThenSessionIsNotCreated() throws Excepti
621
623
@ Test
622
624
public void requestWhenIntrospectionConfiguredThenSessionIsNotCreated () throws Exception {
623
625
this .spring .register (RestOperationsConfig .class , OpaqueTokenConfig .class , BasicController .class ).autowire ();
624
- mockRestOperations (json ("Active" ));
626
+ mockJsonRestOperations (json ("Active" ));
625
627
// @formatter:off
626
628
MvcResult result = this .mvc .perform (get ("/authenticated" ).with (bearerToken ("token" )))
627
629
.andExpect (status ().isOk ())
@@ -646,7 +648,7 @@ public void requestWhenUsingDefaultsAndNoBearerTokenThenSessionIsCreated() throw
646
648
public void requestWhenSessionManagementConfiguredThenUserConfigurationOverrides () throws Exception {
647
649
this .spring .register (RestOperationsConfig .class , AlwaysSessionCreationConfig .class , BasicController .class )
648
650
.autowire ();
649
- mockRestOperations (jwks ("Default" ));
651
+ mockJwksRestOperations (jwks ("Default" ));
650
652
String token = this .token ("ValidNoScopes" );
651
653
// @formatter:off
652
654
MvcResult result = this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -917,7 +919,7 @@ public void accessDeniedHandlerWhenGivenNullThenThrowsException() {
917
919
@ Test
918
920
public void requestWhenCustomJwtValidatorFailsThenCorrespondingErrorMessage () throws Exception {
919
921
this .spring .register (RestOperationsConfig .class , CustomJwtValidatorConfig .class ).autowire ();
920
- mockRestOperations (jwks ("Default" ));
922
+ mockJwksRestOperations (jwks ("Default" ));
921
923
String token = this .token ("ValidNoScopes" );
922
924
OAuth2TokenValidator <Jwt > jwtValidator = this .spring .getContext ()
923
925
.getBean (CustomJwtValidatorConfig .class )
@@ -935,7 +937,7 @@ public void requestWhenCustomJwtValidatorFailsThenCorrespondingErrorMessage() th
935
937
public void requestWhenClockSkewSetThenTimestampWindowRelaxedAccordingly () throws Exception {
936
938
this .spring .register (RestOperationsConfig .class , UnexpiredJwtClockSkewConfig .class , BasicController .class )
937
939
.autowire ();
938
- mockRestOperations (jwks ("Default" ));
940
+ mockJwksRestOperations (jwks ("Default" ));
939
941
String token = this .token ("ExpiresAt4687177990" );
940
942
// @formatter:off
941
943
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -947,7 +949,7 @@ public void requestWhenClockSkewSetThenTimestampWindowRelaxedAccordingly() throw
947
949
public void requestWhenClockSkewSetButJwtStillTooLateThenReportsExpired () throws Exception {
948
950
this .spring .register (RestOperationsConfig .class , ExpiredJwtClockSkewConfig .class , BasicController .class )
949
951
.autowire ();
950
- mockRestOperations (jwks ("Default" ));
952
+ mockJwksRestOperations (jwks ("Default" ));
951
953
String token = this .token ("ExpiresAt4687177990" );
952
954
// @formatter:off
953
955
this .mvc .perform (get ("/" ).with (bearerToken (token )))
@@ -1061,7 +1063,7 @@ public void getWhenDefaultAndCustomJwtAuthenticationManagerThenCustomUsed() thro
1061
1063
@ Test
1062
1064
public void getWhenIntrospectingThenOk () throws Exception {
1063
1065
this .spring .register (RestOperationsConfig .class , OpaqueTokenConfig .class , BasicController .class ).autowire ();
1064
- mockRestOperations (json ("Active" ));
1066
+ mockJsonRestOperations (json ("Active" ));
1065
1067
// @formatter:off
1066
1068
this .mvc .perform (get ("/authenticated" ).with (bearerToken ("token" )))
1067
1069
.andExpect (status ().isOk ())
@@ -1073,7 +1075,7 @@ public void getWhenIntrospectingThenOk() throws Exception {
1073
1075
public void getWhenOpaqueTokenInLambdaAndIntrospectingThenOk () throws Exception {
1074
1076
this .spring .register (RestOperationsConfig .class , OpaqueTokenInLambdaConfig .class , BasicController .class )
1075
1077
.autowire ();
1076
- mockRestOperations (json ("Active" ));
1078
+ mockJsonRestOperations (json ("Active" ));
1077
1079
// @formatter:off
1078
1080
this .mvc .perform (get ("/authenticated" ).with (bearerToken ("token" )))
1079
1081
.andExpect (status ().isOk ())
@@ -1084,7 +1086,7 @@ public void getWhenOpaqueTokenInLambdaAndIntrospectingThenOk() throws Exception
1084
1086
@ Test
1085
1087
public void getWhenIntrospectionFailsThenUnauthorized () throws Exception {
1086
1088
this .spring .register (RestOperationsConfig .class , OpaqueTokenConfig .class ).autowire ();
1087
- mockRestOperations (json ("Inactive" ));
1089
+ mockJsonRestOperations (json ("Inactive" ));
1088
1090
// @formatter:off
1089
1091
this .mvc .perform (get ("/" ).with (bearerToken ("token" )))
1090
1092
.andExpect (status ().isUnauthorized ())
@@ -1095,7 +1097,7 @@ public void getWhenIntrospectionFailsThenUnauthorized() throws Exception {
1095
1097
@ Test
1096
1098
public void getWhenIntrospectionLacksScopeThenForbidden () throws Exception {
1097
1099
this .spring .register (RestOperationsConfig .class , OpaqueTokenConfig .class ).autowire ();
1098
- mockRestOperations (json ("ActiveNoScopes" ));
1100
+ mockJsonRestOperations (json ("ActiveNoScopes" ));
1099
1101
// @formatter:off
1100
1102
this .mvc .perform (get ("/requires-read-scope" ).with (bearerToken ("token" )))
1101
1103
.andExpect (status ().isForbidden ())
@@ -1252,7 +1254,7 @@ public void requestWhenDefaultAndResourceServerAccessDeniedHandlersThenMatchedBy
1252
1254
public void getWhenAlsoUsingHttpBasicThenCorrectProviderEngages () throws Exception {
1253
1255
this .spring .register (RestOperationsConfig .class , BasicAndResourceServerConfig .class , BasicController .class )
1254
1256
.autowire ();
1255
- mockRestOperations (jwks ("Default" ));
1257
+ mockJwksRestOperations (jwks ("Default" ));
1256
1258
String token = this .token ("ValidNoScopes" );
1257
1259
// @formatter:off
1258
1260
this .mvc .perform (get ("/authenticated" ).with (bearerToken (token )))
@@ -1408,7 +1410,7 @@ public void getWhenCustomAuthenticationConverterThenUsed() throws Exception {
1408
1410
OpaqueTokenAuthenticationConverter authenticationConverter = bean (OpaqueTokenAuthenticationConverter .class );
1409
1411
given (authenticationConverter .convert (anyString (), any (OAuth2AuthenticatedPrincipal .class )))
1410
1412
.willReturn (new TestingAuthenticationToken ("jdoe" , null , Collections .emptyList ()));
1411
- mockRestOperations (json ("Active" ));
1413
+ mockJsonRestOperations (json ("Active" ));
1412
1414
// @formatter:off
1413
1415
this .mvc .perform (get ("/authenticated" ).with (bearerToken ("token" )))
1414
1416
.andExpect (status ().isOk ())
@@ -1515,6 +1517,29 @@ private void mockRestOperations(String response) {
1515
1517
given (rest .exchange (any (RequestEntity .class ), eq (String .class ))).willReturn (entity );
1516
1518
}
1517
1519
1520
+ private void mockJwksRestOperations (String response ) {
1521
+ RestOperations rest = this .spring .getContext ().getBean (RestOperations .class );
1522
+ HttpHeaders headers = new HttpHeaders ();
1523
+ headers .setContentType (MediaType .APPLICATION_JSON );
1524
+ ResponseEntity <String > entity = new ResponseEntity <>(response , headers , HttpStatus .OK );
1525
+ given (rest .exchange (any (RequestEntity .class ), eq (String .class ))).willReturn (entity );
1526
+ }
1527
+
1528
+ private void mockJsonRestOperations (String response ) {
1529
+ try {
1530
+ RestOperations rest = this .spring .getContext ().getBean (RestOperations .class );
1531
+ HttpHeaders headers = new HttpHeaders ();
1532
+ headers .setContentType (MediaType .APPLICATION_JSON );
1533
+ ResponseEntity <Map <String , Object >> entity = new ResponseEntity <>(JSONObjectUtils .parse (response ), headers ,
1534
+ HttpStatus .OK );
1535
+ given (rest .exchange (any (RequestEntity .class ), eq (new ParameterizedTypeReference <Map <String , Object >>() {
1536
+ }))).willReturn (entity );
1537
+ }
1538
+ catch (Exception ex ) {
1539
+ throw new IllegalArgumentException (ex );
1540
+ }
1541
+ }
1542
+
1518
1543
private <T > T bean (Class <T > beanClass ) {
1519
1544
return this .spring .getContext ().getBean (beanClass );
1520
1545
}
0 commit comments