mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
fcbed8ffd9
commit
4523927e28
@ -21,12 +21,11 @@ import java.util.Map;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.ldap.core.LdapTemplate;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Configuration properties to configure {@link LdapTemplate}.
|
||||
* Configuration properties for LDAP.
|
||||
*
|
||||
* @author Eddú Meléndez
|
||||
* @since 1.5.0
|
||||
|
@ -78,6 +78,12 @@
|
||||
"description": "Enable JPA repositories.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.data.ldap.repositories.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Enable LDAP repositories.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "spring.data.mongodb.repositories.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
|
@ -38,7 +38,9 @@ public class LdapDataAutoConfigurationTests {
|
||||
|
||||
@After
|
||||
public void close() {
|
||||
this.context.close();
|
||||
if (this.context != null) {
|
||||
this.context.close();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -17,7 +17,6 @@
|
||||
package org.springframework.boot.autoconfigure.ldap;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
|
||||
@ -37,11 +36,6 @@ public class LdapAutoConfigurationTests {
|
||||
|
||||
private AnnotationConfigApplicationContext context;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
this.context = new AnnotationConfigApplicationContext();
|
||||
}
|
||||
|
||||
@After
|
||||
public void close() {
|
||||
if (this.context != null) {
|
||||
@ -87,6 +81,7 @@ public class LdapAutoConfigurationTests {
|
||||
}
|
||||
|
||||
private void load(String... properties) {
|
||||
this.context = new AnnotationConfigApplicationContext();
|
||||
EnvironmentTestUtils.addEnvironment(this.context, properties);
|
||||
this.context.register(LdapAutoConfiguration.class,
|
||||
PropertyPlaceholderAutoConfiguration.class);
|
||||
|
@ -576,6 +576,9 @@ content into your application; rather pick only the properties that you need.
|
||||
spring.data.elasticsearch.properties.*= # Additional properties used to configure the client.
|
||||
spring.data.elasticsearch.repositories.enabled=true # Enable Elasticsearch repositories.
|
||||
|
||||
# DATA LDAP
|
||||
spring.data.ldap.repositories.enabled=true # Enable LDAP repositories.
|
||||
|
||||
# MONGODB ({sc-spring-boot-autoconfigure}/mongo/MongoProperties.{sc-ext}[MongoProperties])
|
||||
spring.data.mongodb.authentication-database= # Authentication database name.
|
||||
spring.data.mongodb.database=test # Database name.
|
||||
|
Loading…
Reference in New Issue
Block a user