Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authenticating a User with LDAP(projectName="gs-authenticating-ldap")(build=Gradle) #2

Open
sampleCJ opened this issue Oct 23, 2018 · 0 comments

Comments

@sampleCJ
Copy link
Owner

本人在该项目实践中遇到的错误,其实已在官方github项目上的issue中有过提出和解答。但在这些反馈并没有及时更新到Guides文档或github项目的readMe上。
正确配置已于github项目的complete文件夹中。


错误报告

localhost:8080/中输入userpassword后,得到如下反馈:

org.springframework.ldap.CommunicationException: localhost:8389; nested exception is javax.naming.CommunicationException: localhost:8389 [Root exception is java.net.ConnectException: Connection refused]

这可能是缺少某种配置文件映射。

解决方法
我们新增配置文件application.properties,于以下文件路径

gs-authenticating-ldap\src\main\resources`application.properties

application.properties内容如下:

spring.ldap.embedded.ldif=classpath:test-server.ldif
spring.ldap.embedded.base-dn=dc=springframework,dc=org
spring.ldap.embedded.port=8389

注意文本规范,即不应在每句行末留下空格。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant