File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
ldap/src/integration-test/java/org/springframework/security/ldap Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,14 @@ public class ApacheDsContainerConfig {
34
34
ApacheDSContainer ldapContainer () throws Exception {
35
35
this .container = new ApacheDSContainer ("dc=springframework,dc=org" ,
36
36
"classpath:test-server.ldif" );
37
+ this .container .setPort (0 );
37
38
return this .container ;
38
39
}
39
40
40
41
@ Bean
41
- ContextSource contextSource () throws Exception {
42
+ ContextSource contextSource (ApacheDSContainer ldapContainer ) throws Exception {
42
43
return new DefaultSpringSecurityContextSource ("ldap://127.0.0.1:"
43
- + ldapContainer (). getPort () + "/dc=springframework,dc=org" );
44
+ + ldapContainer . getLocalPort () + "/dc=springframework,dc=org" );
44
45
}
45
46
46
47
@ PreDestroy
You can’t perform that action at this time.
0 commit comments