> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iv.-spring-boot-features/30.-working-with-nosql-technologies/30.9-ldap/30.9.2-spring-data-ldap-repositories.md).

# 30.9.2 Spring Data LDAP仓库

Spring Data包含了支持LDAP的仓库。Spring Data LDAP的详细情况，请查看他们的[参考文档](https://docs.spring.io/spring-data/ldap/docs/1.0.x/reference/html/)。

你也可以像其它Spring Bean一样，注入一个自动配置的`LdapTemplate`实例。

```java
@Component
public class MyBean {

    private final LdapTemplate template;

    @Autowired
    public MyBean(LdapTemplate template) {
        this.template = template;
    }

    // ...

}
```
