0
私のアプリケーションでは2種類のLDAP設定を使用したいと思います。私のファイルはapplication.ymlです:Springブート設定 - 2設定LDAP - Ymlファイル
management:
context-path: /management
health:
mail:
enabled: false # When using the MailService, configure an SMTP server and set this to true
spring:
application:
name: matrice2
profiles:
# The commented value for `active` can be replaced with valid spring profiles to load.
# Otherwise, it will be filled in by maven when building the WAR file
# Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
active: #spring.profiles.active#
jpa:
open-in-view: false
hibernate:
ddl-auto: none
naming-strategy: org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy
messages:
basename: i18n/messages
mvc:
favicon:
enabled: false
thymeleaf:
mode: XHTML
security:
basic:
enabled: false
jhipster:
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
mail:
from: [email protected]
swagger:
title: matrice2 API
description: matrice2 API documentation
version: 0.0.1
termsOfServiceUrl:
contactName:
contactUrl:
contactEmail:
license:
licenseUrl:
ldap:
url: ldap://ldap.east.app.company.com:389
base: DC=west,DC=app,DC=company,DC=com
manager:
dn: CN=toto,OU=CDS,OU=Company_Commun,DC=west,DC=app,DC=company,DC=com
password: toto
grpAdmin : GRP_PROJECT_ADMIN
grpUser : GRP_PROJECT_ADMIN
ldap:
url: ldap://ba-dc1.app.company.com:389
base: DC=app,DC=company,DC=com
manager:
dn: CN=ad_c_s,OU=C_d_S,DC=app,DC=company,DC=com
password: toto!service
grpAdmin : GRP_PROJECT_ADMIN
grpUser : GRP_PROJECT_ADMIN
そして、私はこのミスを取得:
Exception in thread "restartedMain" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: while parsing MappingNode
in 'reader', line 14, column 1:
management:
Duplicate key : ldap in 'reader', line 97, column 1.
複数の構成LDAPを持ってする方法はあります?誰かがアイデアを持っていますか?
ありがとうございました