Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Fairuz Wan Ismail committed Dec 25, 2015
1 parent 3163609 commit e982d12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
Expand Down
11 changes: 6 additions & 5 deletions src/main/java/sample/UserApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.ldap.core.ContextSource;
import org.springframework.ldap.core.LdapTemplate;
import org.springframework.ldap.core.support.BaseLdapPathBeanPostProcessor;
import org.springframework.ldap.core.support.LdapContextSource;
import org.springframework.ldap.repository.config.EnableLdapRepositories;

Expand All @@ -19,6 +20,11 @@ public static void main(String[] args) {
SpringApplication.run(UserApplication.class, args);
}

@Bean
public BaseLdapPathBeanPostProcessor baseLdapPathBeanPostProcessor() {
return new BaseLdapPathBeanPostProcessor();
}

@Bean
@ConfigurationProperties(prefix="amba.ldap.contextSource")
public LdapContextSource contextSource() {
Expand All @@ -30,9 +36,4 @@ public LdapContextSource contextSource() {
public LdapTemplate ldapTemplate(ContextSource contextSource) {
return new LdapTemplate(contextSource);
}

// @Bean
// public GroupRepoImpl groupRepoImpl() {
// return new GroupRepoImpl(ldapTemplate(contextSource()));
// }
}
4 changes: 2 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ server:
port: 9998

amba.ldap.contextSource:
url: ldap://127.0.0.1:33389
url: ldap://127.0.0.1:10389
userDn: uid=admin,ou=system
password: secret
base: dc=springframework,dc=org
base: dc=amba,dc=online
directory.type: NORMAL

0 comments on commit e982d12

Please sign in to comment.