parent
068c52b725
commit
53e5d67cde
|
@ -3262,7 +3262,7 @@ http://projects.spring.io/spring-data[projects.spring.io/spring-data].
|
||||||
=== Redis
|
=== Redis
|
||||||
http://redis.io/[Redis] is a cache, message broker and richly-featured key-value store.
|
http://redis.io/[Redis] is a cache, message broker and richly-featured key-value store.
|
||||||
Spring Boot offers basic auto-configuration for the
|
Spring Boot offers basic auto-configuration for the
|
||||||
https://github.com/xetorthio/jedis/[Jedis] and and https://github.com/mp911de/lettuce/[Lettuce]
|
https://github.com/xetorthio/jedis/[Jedis] and https://github.com/mp911de/lettuce/[Lettuce]
|
||||||
client library and abstractions on top of it provided by
|
client library and abstractions on top of it provided by
|
||||||
https://github.com/spring-projects/spring-data-redis[Spring Data Redis].
|
https://github.com/spring-projects/spring-data-redis[Spring Data Redis].
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ import org.springframework.ldap.odm.annotations.Entry;
|
||||||
import org.springframework.ldap.odm.annotations.Id;
|
import org.springframework.ldap.odm.annotations.Id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Example entrey used with {@link DataLdapTest} tests.
|
* Example entry used with {@link DataLdapTest} tests.
|
||||||
*
|
*
|
||||||
* @author Eddú Meléndez
|
* @author Eddú Meléndez
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class HandlerTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void hashcodesAreEqualForUrlsThatReferenceSameFileViaNestedArchiveAndFromRootOfJar()
|
public void hashCodesAreEqualForUrlsThatReferenceSameFileViaNestedArchiveAndFromRootOfJar()
|
||||||
throws MalformedURLException {
|
throws MalformedURLException {
|
||||||
assertThat(this.handler
|
assertThat(this.handler
|
||||||
.hashCode(new URL("jar:file:/test.jar!/BOOT-INF/classes!/foo.txt")))
|
.hashCode(new URL("jar:file:/test.jar!/BOOT-INF/classes!/foo.txt")))
|
||||||
|
|
|
@ -63,7 +63,7 @@ public interface BindHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when binding fails for any reason (including failures from
|
* Called when binding fails for any reason (including failures from
|
||||||
* {@link #onSuccess} calls). Implementations may chose to swallow exceptions and
|
* {@link #onSuccess} calls). Implementations may choose to swallow exceptions and
|
||||||
* return an alternative result.
|
* return an alternative result.
|
||||||
* @param name the name of the element being bound
|
* @param name the name of the element being bound
|
||||||
* @param target the item being bound
|
* @param target the item being bound
|
||||||
|
|
|
@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils;
|
||||||
* Source that can be bound by a {@link Binder}.
|
* Source that can be bound by a {@link Binder}.
|
||||||
*
|
*
|
||||||
* @param <T> The source type
|
* @param <T> The source type
|
||||||
* @author Philip Webb
|
* @author Phillip Webb
|
||||||
* @author Madhura Bhave
|
* @author Madhura Bhave
|
||||||
* @since 2.0.0
|
* @since 2.0.0
|
||||||
* @see Bindable#of(Class)
|
* @see Bindable#of(Class)
|
||||||
|
@ -195,7 +195,7 @@ public final class Bindable<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@link Bindable} {@link Map} of the specified kay and value type.
|
* Create a new {@link Bindable} {@link Map} of the specified key and value type.
|
||||||
* @param <K> the key type
|
* @param <K> the key type
|
||||||
* @param <V> the value type
|
* @param <V> the value type
|
||||||
* @param keyType the map key type
|
* @param keyType the map key type
|
||||||
|
|
|
@ -443,7 +443,7 @@ public final class ConfigurationPropertyName
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The uniform configuration form (used for equals/hashcode; lower-case with only
|
* The uniform configuration form (used for equals/hashCode; lower-case with only
|
||||||
* alphanumeric characters).
|
* alphanumeric characters).
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>"{@code foo-bar}" = "{@code foobar}"</li>
|
* <li>"{@code foo-bar}" = "{@code foobar}"</li>
|
||||||
|
|
|
@ -91,8 +91,8 @@ public class MustacheView extends AbstractUrlBasedView {
|
||||||
writer.flush();
|
writer.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable exc) {
|
catch (Throwable ex) {
|
||||||
return Mono.error(exc);
|
return Mono.error(ex);
|
||||||
}
|
}
|
||||||
return exchange.getResponse().writeWith(Flux.just(dataBuffer));
|
return exchange.getResponse().writeWith(Flux.just(dataBuffer));
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class ArrayBinderTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void bindToArrayShouldReturnPrimativeArray() throws Exception {
|
public void bindToArrayShouldReturnPrimitiveArray() throws Exception {
|
||||||
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
|
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
|
||||||
source.put("foo[0]", "1");
|
source.put("foo[0]", "1");
|
||||||
source.put("foo[1]", "2");
|
source.put("foo[1]", "2");
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class BindableTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getBoxedTypeWhenPrimativeShouldReturnBoxedType() throws Exception {
|
public void getBoxedTypeWhenPrimitiveShouldReturnBoxedType() throws Exception {
|
||||||
Bindable<Integer> bindable = Bindable.of(int.class);
|
Bindable<Integer> bindable = Bindable.of(int.class);
|
||||||
assertThat(bindable.getType()).isEqualTo(ResolvableType.forClass(int.class));
|
assertThat(bindable.getType()).isEqualTo(ResolvableType.forClass(int.class));
|
||||||
assertThat(bindable.getBoxedType())
|
assertThat(bindable.getBoxedType())
|
||||||
|
@ -121,7 +121,7 @@ public class BindableTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getBoxedTypeWhenPrimativeArrayShouldReturnBoxedType() throws Exception {
|
public void getBoxedTypeWhenPrimitiveArrayShouldReturnBoxedType() throws Exception {
|
||||||
Bindable<int[]> bindable = Bindable.of(int[].class);
|
Bindable<int[]> bindable = Bindable.of(int[].class);
|
||||||
assertThat(bindable.getType().getComponentType())
|
assertThat(bindable.getType().getComponentType())
|
||||||
.isEqualTo(ResolvableType.forClass(int.class));
|
.isEqualTo(ResolvableType.forClass(int.class));
|
||||||
|
@ -156,7 +156,7 @@ public class BindableTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void equalsAndHashcode() throws Exception {
|
public void equalsAndHashCode() throws Exception {
|
||||||
Annotation annotation = AnnotationUtils
|
Annotation annotation = AnnotationUtils
|
||||||
.synthesizeAnnotation(TestAnnotation.class);
|
.synthesizeAnnotation(TestAnnotation.class);
|
||||||
Bindable<String> bindable1 = Bindable.of(String.class).withExistingValue("foo")
|
Bindable<String> bindable1 = Bindable.of(String.class).withExistingValue("foo")
|
||||||
|
|
|
@ -439,7 +439,7 @@ public class JavaBeanBinderTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void bindtoInstanceWithExistingValueShouldReturnUnbound() throws Exception {
|
public void bindToInstanceWithExistingValueShouldReturnUnbound() throws Exception {
|
||||||
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
|
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
|
||||||
this.sources.add(source);
|
this.sources.add(source);
|
||||||
ExampleNestedBean existingValue = new ExampleNestedBean();
|
ExampleNestedBean existingValue = new ExampleNestedBean();
|
||||||
|
|
|
@ -51,14 +51,14 @@ public class IgnoreNestedPropertiesBindHandlerTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void bindWhenNotIngoringNestedShouldBindAll() throws Exception {
|
public void bindWhenNotIgnoringNestedShouldBindAll() throws Exception {
|
||||||
Example bound = this.binder.bind("example", Bindable.of(Example.class)).get();
|
Example bound = this.binder.bind("example", Bindable.of(Example.class)).get();
|
||||||
assertThat(bound.getFoo()).isEqualTo("foovalue");
|
assertThat(bound.getFoo()).isEqualTo("foovalue");
|
||||||
assertThat(bound.getNested().getBar()).isEqualTo("barvalue");
|
assertThat(bound.getNested().getBar()).isEqualTo("barvalue");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void bindWhenIngoringNestedShouldFilterNested() throws Exception {
|
public void bindWhenIgnoringNestedShouldFilterNested() throws Exception {
|
||||||
Example bound = this.binder.bind("example", Bindable.of(Example.class),
|
Example bound = this.binder.bind("example", Bindable.of(Example.class),
|
||||||
new IgnoreNestedPropertiesBindHandler()).get();
|
new IgnoreNestedPropertiesBindHandler()).get();
|
||||||
assertThat(bound.getFoo()).isEqualTo("foovalue");
|
assertThat(bound.getFoo()).isEqualTo("foovalue");
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class AliasedIterableConfigurationPropertySourceTests
|
||||||
extends AliasedConfigurationPropertySourceTests {
|
extends AliasedConfigurationPropertySourceTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void streamShouldInclueAliases() throws Exception {
|
public void streamShouldIncludeAliases() throws Exception {
|
||||||
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
|
MockConfigurationPropertySource source = new MockConfigurationPropertySource();
|
||||||
source.put("foo.bar", "bing");
|
source.put("foo.bar", "bing");
|
||||||
source.put("foo.baz", "biff");
|
source.put("foo.baz", "biff");
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class ConfigurationPropertyNameAliasesTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void addAlaisesFromNameShouldAddMapping() throws Exception {
|
public void addAliasesFromNameShouldAddMapping() throws Exception {
|
||||||
ConfigurationPropertyNameAliases aliases = new ConfigurationPropertyNameAliases();
|
ConfigurationPropertyNameAliases aliases = new ConfigurationPropertyNameAliases();
|
||||||
aliases.addAliases(ConfigurationPropertyName.of("foo"),
|
aliases.addAliases(ConfigurationPropertyName.of("foo"),
|
||||||
ConfigurationPropertyName.of("bar"), ConfigurationPropertyName.of("baz"));
|
ConfigurationPropertyName.of("bar"), ConfigurationPropertyName.of("baz"));
|
||||||
|
|
|
@ -111,7 +111,7 @@ public class ConfigurationPropertySourcesTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void attachShouldAddAdapterAtBegining() throws Exception {
|
public void attachShouldAddAdapterAtBeginning() throws Exception {
|
||||||
MutablePropertySources sources = new MutablePropertySources();
|
MutablePropertySources sources = new MutablePropertySources();
|
||||||
sources.addLast(new SystemEnvironmentPropertySource("system",
|
sources.addLast(new SystemEnvironmentPropertySource("system",
|
||||||
Collections.<String, Object>singletonMap("SERVER_PORT", "1234")));
|
Collections.<String, Object>singletonMap("SERVER_PORT", "1234")));
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class ConfigurationPropertyTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getPropertyOrginShouldReturnValuePropertyOrigin() throws Exception {
|
public void getPropertyOriginShouldReturnValuePropertyOrigin() throws Exception {
|
||||||
Origin origin = mock(Origin.class);
|
Origin origin = mock(Origin.class);
|
||||||
OriginProvider property = ConfigurationProperty.of(NAME, "foo", origin);
|
OriginProvider property = ConfigurationProperty.of(NAME, "foo", origin);
|
||||||
assertThat(property.getOrigin()).isEqualTo(origin);
|
assertThat(property.getOrigin()).isEqualTo(origin);
|
||||||
|
|
Loading…
Reference in New Issue