Merge pull request #11630 from izeye:polish-20180114

* pr/11630:
  Polish
pull/11638/head
Stephane Nicoll 7 years ago
commit 29ebb75d0b

@ -44,12 +44,12 @@ public class GsonProperties {
private Boolean excludeFieldsWithoutExposeAnnotation; private Boolean excludeFieldsWithoutExposeAnnotation;
/** /**
* Whether to to serialize null fields. * Whether to serialize null fields.
*/ */
private Boolean serializeNulls; private Boolean serializeNulls;
/** /**
* Whether to enabled serialization of complex map keys (i.e. non-primitives). * Whether to enable serialization of complex map keys (i.e. non-primitives).
*/ */
private Boolean enableComplexMapKeySerialization; private Boolean enableComplexMapKeySerialization;
@ -64,7 +64,7 @@ public class GsonProperties {
private LongSerializationPolicy longSerializationPolicy; private LongSerializationPolicy longSerializationPolicy;
/** /**
* The naming policy that should be applied to an object's field during serialization * Naming policy that should be applied to an object's field during serialization
* and deserialization. * and deserialization.
*/ */
private FieldNamingPolicy fieldNamingPolicy; private FieldNamingPolicy fieldNamingPolicy;
@ -80,12 +80,12 @@ public class GsonProperties {
private Boolean lenient; private Boolean lenient;
/** /**
* Whether to disable the escaping of HTML characters such as '<' '>' etc. * Whether to disable the escaping of HTML characters such as '<', '>', etc.
*/ */
private Boolean disableHtmlEscaping; private Boolean disableHtmlEscaping;
/** /**
* The format to use when serializing Date objects. * Format to use when serializing Date objects.
*/ */
private String dateFormat; private String dateFormat;

@ -181,7 +181,7 @@ public class GsonAutoConfigurationTests {
this.contextRunner.run(context -> { this.contextRunner.run(context -> {
Gson gson = context.getBean(Gson.class); Gson gson = context.getBean(Gson.class);
/* /*
* It seems, that lenient setting not work in version 2.8.2 We get access to * It seems that lenient setting not work in version 2.8.2. We get access to
* it via reflection * it via reflection
*/ */
Field lenientField = gson.getClass().getDeclaredField("lenient"); Field lenientField = gson.getClass().getDeclaredField("lenient");
@ -196,10 +196,9 @@ public class GsonAutoConfigurationTests {
public void withLenient() { public void withLenient() {
this.contextRunner.withPropertyValues("spring.gson.lenient:true").run(context -> { this.contextRunner.withPropertyValues("spring.gson.lenient:true").run(context -> {
Gson gson = context.getBean(Gson.class); Gson gson = context.getBean(Gson.class);
/* /*
* It seems, that lenient setting not work in version 2.8.0 of gson We get * It seems that lenient setting not work in version 2.8.2. We get access to
* access to it via reflection * it via reflection
*/ */
Field lenientField = gson.getClass().getDeclaredField("lenient"); Field lenientField = gson.getClass().getDeclaredField("lenient");
lenientField.setAccessible(true); lenientField.setAccessible(true);
@ -271,8 +270,6 @@ public class GsonAutoConfigurationTests {
public class DataObject { public class DataObject {
public static final String STATIC_DATA = "bye";
@SuppressWarnings("unused") @SuppressWarnings("unused")
private Long data = 1L; private Long data = 1L;

@ -227,8 +227,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests {
.build(); .build();
this.thrown.expectCause(instanceOf(IllegalStateException.class)); this.thrown.expectCause(instanceOf(IllegalStateException.class));
this.thrown.expectMessage("already committed!"); this.thrown.expectMessage("already committed!");
client.get().uri("/commit").exchange().expectStatus().isEqualTo(HttpStatus.OK) client.get().uri("/commit").exchange().expectStatus();
.expectBody().isEmpty();
}); });
} }

@ -340,17 +340,17 @@ content into your application. Rather, pick only the properties that you need.
spring.jackson.time-zone= # Time zone used when formatting dates. For instance, "America/Los_Angeles" or "GMT+10". spring.jackson.time-zone= # Time zone used when formatting dates. For instance, "America/Los_Angeles" or "GMT+10".
# GSON ({sc-spring-boot-autoconfigure}/gson/GsonProperties.{sc-ext}[GsonProperties]) # GSON ({sc-spring-boot-autoconfigure}/gson/GsonProperties.{sc-ext}[GsonProperties])
spring.gson.date-format= # The format to use when serializing Date objects. spring.gson.date-format= # Format to use when serializing Date objects.
spring.gson.disable-html-escaping= # Whether to disable the escaping of HTML characters such as '<' '>' etc. spring.gson.disable-html-escaping= # Whether to disable the escaping of HTML characters such as '<', '>', etc.
spring.gson.disable-inner-class-serialization= # Whether to exclude inner classes during serialization. spring.gson.disable-inner-class-serialization= # Whether to exclude inner classes during serialization.
spring.gson.enable-complex-map-key-serialization= # Whether to enabled serialization of complex map keys (i.e. non-primitives). spring.gson.enable-complex-map-key-serialization= # Whether to enable serialization of complex map keys (i.e. non-primitives).
spring.gson.exclude-fields-without-expose-annotation= # Whether to exclude all fields from consideration for serialization or deserialization that do not have the "Expose" annotation. spring.gson.exclude-fields-without-expose-annotation= # Whether to exclude all fields from consideration for serialization or deserialization that do not have the "Expose" annotation.
spring.gson.field-naming-policy= # The naming policy that should be applied to an object's field during serialization and deserialization. spring.gson.field-naming-policy= # Naming policy that should be applied to an object's field during serialization and deserialization.
spring.gson.generate-non-executable-json= # Whether to generate non executable JSON by prefixing the output with some special text. spring.gson.generate-non-executable-json= # Whether to generate non executable JSON by prefixing the output with some special text.
spring.gson.lenient= # Whether to be lenient about parsing JSON that doesn't conform to RFC 4627. spring.gson.lenient= # Whether to be lenient about parsing JSON that doesn't conform to RFC 4627.
spring.gson.long-serialization-policy= # Serialization policy for Long and long types. spring.gson.long-serialization-policy= # Serialization policy for Long and long types.
spring.gson.pretty-printing= # Whether to output serialized JSON that fits in a page for pretty printing. spring.gson.pretty-printing= # Whether to output serialized JSON that fits in a page for pretty printing.
spring.gson.serialize-nulls= # Whether to to serialize null fields. spring.gson.serialize-nulls= # Whether to serialize null fields.
# JERSEY ({sc-spring-boot-autoconfigure}/jersey/JerseyProperties.{sc-ext}[JerseyProperties]) # JERSEY ({sc-spring-boot-autoconfigure}/jersey/JerseyProperties.{sc-ext}[JerseyProperties])
spring.jersey.application-path= # Path that serves as the base URI for the application. If specified, overrides the value of "@ApplicationPath". spring.jersey.application-path= # Path that serves as the base URI for the application. If specified, overrides the value of "@ApplicationPath".

@ -15,11 +15,11 @@ build system. If you are just getting started, you might want to read
[[build-tool-plugins-maven-plugin]] [[build-tool-plugins-maven-plugin]]
== Spring Boot Maven Plugin == Spring Boot Maven Plugin
The {spring-boot-maven-plugin-site}/[Spring Boot Maven Plugin] provides Spring Boot The {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin] provides Spring Boot
support in Maven, letting you package executable jar or war archives and run an support in Maven, letting you package executable jar or war archives and run an
application "`in-place`". To use it, you must use Maven 3.2 (or later). application "`in-place`". To use it, you must use Maven 3.2 (or later).
NOTE: See the {spring-boot-maven-plugin-site}/[Spring Boot Maven Plugin Site] for complete NOTE: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin Site] for complete
plugin documentation. plugin documentation.
@ -160,7 +160,7 @@ TIP: See the "`<<howto-create-a-deployable-war-file>>`" section for more details
create a deployable war file. create a deployable war file.
Advanced configuration options and examples are available in the Advanced configuration options and examples are available in the
{spring-boot-maven-plugin-site}/[plugin info page]. {spring-boot-maven-plugin-site}[plugin info page].

@ -1790,7 +1790,7 @@ In addition, all properties in `+spring.jpa.properties.*+` are passed through as
JPA properties (with the prefix stripped) when the local `EntityManagerFactory` is JPA properties (with the prefix stripped) when the local `EntityManagerFactory` is
created. created.
TIP: if you need to apply advanced customization to Hibernate properties, consider TIP: If you need to apply advanced customization to Hibernate properties, consider
registering a `HibernatePropertiesCustomizer` bean that will be invoked prior to creating registering a `HibernatePropertiesCustomizer` bean that will be invoked prior to creating
the `EntityManagerFactory`. This takes precedence to anything that is applied by the the `EntityManagerFactory`. This takes precedence to anything that is applied by the
auto-configuration. auto-configuration.
@ -2486,7 +2486,7 @@ shown in the following example:
</build> </build>
---- ----
TIP: See the {spring-boot-maven-plugin-site}/[Spring Boot Maven Plugin documentation] TIP: See the {spring-boot-maven-plugin-site}[Spring Boot Maven Plugin documentation]
for more details. for more details.
The following example does the same with Gradle: The following example does the same with Gradle:
@ -2742,7 +2742,7 @@ for the library, as follows:
[[howto-remote-debug-maven-run]] [[howto-remote-debug-maven-run]]
=== Remote Debug a Spring Boot Application Started with Maven === Remote Debug a Spring Boot Application Started with Maven
To attach a remote debugger to a Spring Boot application that was started with Maven, you To attach a remote debugger to a Spring Boot application that was started with Maven, you
can use the `jvmArguments` property of the {spring-boot-maven-plugin-site}/[maven plugin]. can use the `jvmArguments` property of the {spring-boot-maven-plugin-site}[maven plugin].
See {spring-boot-maven-plugin-site}/examples/run-debug.html[this example] for more See {spring-boot-maven-plugin-site}/examples/run-debug.html[this example] for more
details. details.

@ -36,8 +36,8 @@ Phillip Webb; Dave Syer; Josh Long; Stéphane Nicoll; Rob Winch; Andy Wilkinson;
:dependency-management-plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin :dependency-management-plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin
:dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md :dependency-management-plugin-documentation: {dependency-management-plugin}/blob/master/README.md
:spring-boot-actuator-api: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/actuator-api/ :spring-boot-actuator-api: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/actuator-api/
:spring-boot-maven-plugin-site: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin/ :spring-boot-maven-plugin-site: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/maven-plugin
:spring-boot-gradle-plugin: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/gradle-plugin/ :spring-boot-gradle-plugin: http://docs.spring.io/spring-boot/docs/{spring-boot-docs-version}/gradle-plugin
:spring-reference: http://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/ :spring-reference: http://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/
:spring-rest-docs: http://projects.spring.io/spring-restdocs/ :spring-rest-docs: http://projects.spring.io/spring-restdocs/
:spring-integration: http://projects.spring.io/spring-integration/ :spring-integration: http://projects.spring.io/spring-integration/

@ -562,7 +562,7 @@ in your `ApplicationContext`. Spring Boot includes a number of auto-configured
[[production-ready-application-info-autoconfigure]] [[production-ready-application-info-autoconfigure]]
==== Auto-configured InfoContributors ==== Auto-configured InfoContributors
The following `InfoContributor ` beans are auto-configured by Spring Boot, when The following `InfoContributor` beans are auto-configured by Spring Boot, when
appropriate: appropriate:
[cols="1,4"] [cols="1,4"]

@ -1782,7 +1782,7 @@ _<<getting-started.adoc#getting-started-first-application, Getting started>>_ se
=== The "`Spring Web MVC Framework`" === The "`Spring Web MVC Framework`"
The {spring-reference}web.html#mvc[Spring Web MVC framework] (often referred to as simply The {spring-reference}web.html#mvc[Spring Web MVC framework] (often referred to as simply
"`Spring MVC`") is a rich "`model view controller`" web framework. Spring MVC lets you "`Spring MVC`") is a rich "`model view controller`" web framework. Spring MVC lets you
create special `@Controller`or `@RestController` beans to handle incoming HTTP requests. create special `@Controller` or `@RestController` beans to handle incoming HTTP requests.
Methods in your controller are mapped to HTTP by using `@RequestMapping` annotations. Methods in your controller are mapped to HTTP by using `@RequestMapping` annotations.
The following code shows a typical `@RestController` that serves JSON data: The following code shows a typical `@RestController` that serves JSON data:

@ -22,7 +22,7 @@ import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
// Note: this class was written without inspecting the non-free org.json sourcecode. // Note: this class was written without inspecting the non-free org.json source code.
/** /**
* A dense indexed sequence of values. Values may be any mix of {@link JSONObject * A dense indexed sequence of values. Values may be any mix of {@link JSONObject

@ -16,7 +16,7 @@
package org.springframework.boot.configurationprocessor.json; package org.springframework.boot.configurationprocessor.json;
// Note: this class was written without inspecting the non-free org.json sourcecode. // Note: this class was written without inspecting the non-free org.json source code.
/** /**
* Thrown to indicate a problem with the JSON API. Such problems include: * Thrown to indicate a problem with the JSON API. Such problems include:

@ -22,7 +22,7 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
// Note: this class was written without inspecting the non-free org.json sourcecode. // Note: this class was written without inspecting the non-free org.json source code.
/** /**
* A modifiable set of name/value mappings. Names are unique, non-null strings. Values may * A modifiable set of name/value mappings. Names are unique, non-null strings. Values may

@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
// Note: this class was written without inspecting the non-free org.json sourcecode. // Note: this class was written without inspecting the non-free org.json source code.
/** /**
* Implements {@link JSONObject#toString} and {@link JSONArray#toString}. Most application * Implements {@link JSONObject#toString} and {@link JSONArray#toString}. Most application

@ -16,7 +16,7 @@
package org.springframework.boot.configurationprocessor.json; package org.springframework.boot.configurationprocessor.json;
// Note: this class was written without inspecting the non-free org.json sourcecode. // Note: this class was written without inspecting the non-free org.json source code.
/** /**
* Parses a JSON (<a href="http://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>) encoded * Parses a JSON (<a href="http://www.ietf.org/rfc/rfc4627.txt">RFC 4627</a>) encoded

@ -58,7 +58,7 @@ public abstract class DynamicRegistrationBean<D extends Registration.Dynamic>
} }
/** /**
* Sets if asynchronous operations are support for this registration. If not specified * Sets if asynchronous operations are supported for this registration. If not specified
* defaults to {@code true}. * defaults to {@code true}.
* @param asyncSupported if async is supported * @param asyncSupported if async is supported
*/ */
@ -67,7 +67,7 @@ public abstract class DynamicRegistrationBean<D extends Registration.Dynamic>
} }
/** /**
* Returns if asynchronous operations are support for this registration. * Returns if asynchronous operations are supported for this registration.
* @return if async is supported * @return if async is supported
*/ */
public boolean isAsyncSupported() { public boolean isAsyncSupported() {

@ -246,8 +246,8 @@ public class ServletContextInitializerBeans
} }
/** /**
* Adapter to convert a given Bean type into a {@link DynamicRegistrationBean} (and * Adapter to convert a given Bean type into a {@link RegistrationBean} (and
* hence a {@link ServletContextInitializer}. * hence a {@link ServletContextInitializer}).
*/ */
private interface RegistrationBeanAdapter<T> { private interface RegistrationBeanAdapter<T> {

@ -55,7 +55,7 @@ public class SampleSecureWebFluxCustomSecurityTests {
} }
@Test @Test
public void healthAndInfoDontRequireAuthentication() { public void healthAndInfoDoNotRequireAuthentication() {
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON) this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON)
.exchange().expectStatus().isOk(); .exchange().expectStatus().isOk();
this.webClient.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON) this.webClient.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON)

Loading…
Cancel
Save