关于ldap连接的问题

来源:5-2 LDAP 配置和多 AuthenticationProvider 共存

weixin_慕仙4291322

2021-11-08

org.springframework.ldap.CommunicationException: localhost:389; nested exception is javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect]
老师,这个问题怎么解决啊。下面是我的yml
server:
port: ${SERVER_PORT:8080}

spring:
ldap:
urls: ldap://localhost:8389/
base: bc=imooc,dc=com
embedded:
base-dn: dc=imooc,dc=com
ldif: classpath:test-ldap-server.ldif
port: 8389
application:
name: uaa
#security 配置用户名密码
security:
user:
name: user
password: 12345678
roles: USER,ADMIN
messages:
basename: messages
encoding: UTF-8
fallback-to-system-locale: true
use-code-as-default-message: false
datasource:
initialization-mode: embedded

2.4以后的环境切换

config:
activate:
on-profile: dev

写回答

2回答

接灰的电子产品

2021-11-09

ldap 服务器没启动起来

0
3
宝慕林0526976
回复
weixin_慕仙4291322
怎么解决的
2022-06-03
共3条回复

慕勒4294746

2024-06-29

给以后学习的提供个参考 可能是由于spring端口权限的问题或windows系统原因使用10389等其他更大端口号 或管理员运行ide 以解决

0
0

Spring Security+OAuth2 精讲,打造企业级认证与授权

一站式掌握主流安全框架与行业解决方案,从容应对各种安全难题。

1042 学习 · 316 问题

查看课程