File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
default-authorizationserver/src/test/java/sample
demo-authorizationserver/src/test/java/sample Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 3131import org .springframework .beans .factory .annotation .Autowired ;
3232import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
3333import org .springframework .boot .test .context .SpringBootTest ;
34- import org .springframework .boot . test .mock . mockito .MockBean ;
34+ import org .springframework .test .context . bean . override . mockito .MockitoBean ;
3535import org .springframework .http .HttpStatus ;
3636import org .springframework .security .oauth2 .server .authorization .OAuth2AuthorizationConsentService ;
3737import org .springframework .security .test .context .support .WithMockUser ;
38+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
3839import org .springframework .test .context .junit .jupiter .SpringExtension ;
3940import org .springframework .web .util .UriComponentsBuilder ;
4041
@@ -55,7 +56,7 @@ public class DefaultAuthorizationServerConsentTests {
5556 @ Autowired
5657 private WebClient webClient ;
5758
58- @ MockBean
59+ @ MockitoBean
5960 private OAuth2AuthorizationConsentService authorizationConsentService ;
6061
6162 private final String redirectUri = "http://127.0.0.1/login/oauth2/code/messaging-client-oidc" ;
Original file line number Diff line number Diff line change 3131import org .springframework .beans .factory .annotation .Autowired ;
3232import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
3333import org .springframework .boot .test .context .SpringBootTest ;
34- import org .springframework .boot . test .mock . mockito .MockBean ;
34+ import org .springframework .test .context . bean . override . mockito .MockitoBean ;
3535import org .springframework .http .HttpStatus ;
3636import org .springframework .security .oauth2 .server .authorization .OAuth2AuthorizationConsentService ;
3737import org .springframework .security .test .context .support .WithMockUser ;
@@ -55,7 +55,7 @@ public class DemoAuthorizationServerConsentTests {
5555 @ Autowired
5656 private WebClient webClient ;
5757
58- @ MockBean
58+ @ MockitoBean
5959 private OAuth2AuthorizationConsentService authorizationConsentService ;
6060
6161 private final String redirectUri = "http://127.0.0.1/login/oauth2/code/messaging-client-oidc" ;
You can’t perform that action at this time.
0 commit comments