Merge pull request #11630 from izeye:polish-20180114
* pr/11630: Polish
This commit is contained in:
@@ -44,12 +44,12 @@ public class GsonProperties {
|
||||
private Boolean excludeFieldsWithoutExposeAnnotation;
|
||||
|
||||
/**
|
||||
* Whether to to serialize null fields.
|
||||
* Whether to serialize null fields.
|
||||
*/
|
||||
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;
|
||||
|
||||
@@ -64,7 +64,7 @@ public class GsonProperties {
|
||||
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.
|
||||
*/
|
||||
private FieldNamingPolicy fieldNamingPolicy;
|
||||
@@ -80,12 +80,12 @@ public class GsonProperties {
|
||||
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;
|
||||
|
||||
/**
|
||||
* The format to use when serializing Date objects.
|
||||
* Format to use when serializing Date objects.
|
||||
*/
|
||||
private String dateFormat;
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ public class GsonAutoConfigurationTests {
|
||||
this.contextRunner.run(context -> {
|
||||
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
|
||||
*/
|
||||
Field lenientField = gson.getClass().getDeclaredField("lenient");
|
||||
@@ -196,10 +196,9 @@ public class GsonAutoConfigurationTests {
|
||||
public void withLenient() {
|
||||
this.contextRunner.withPropertyValues("spring.gson.lenient:true").run(context -> {
|
||||
Gson gson = context.getBean(Gson.class);
|
||||
|
||||
/*
|
||||
* It seems, that lenient setting not work in version 2.8.0 of gson We get
|
||||
* access to it via reflection
|
||||
* It seems that lenient setting not work in version 2.8.2. We get access to
|
||||
* it via reflection
|
||||
*/
|
||||
Field lenientField = gson.getClass().getDeclaredField("lenient");
|
||||
lenientField.setAccessible(true);
|
||||
@@ -271,8 +270,6 @@ public class GsonAutoConfigurationTests {
|
||||
|
||||
public class DataObject {
|
||||
|
||||
public static final String STATIC_DATA = "bye";
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private Long data = 1L;
|
||||
|
||||
|
||||
@@ -227,8 +227,7 @@ public class DefaultErrorWebExceptionHandlerIntegrationTests {
|
||||
.build();
|
||||
this.thrown.expectCause(instanceOf(IllegalStateException.class));
|
||||
this.thrown.expectMessage("already committed!");
|
||||
client.get().uri("/commit").exchange().expectStatus().isEqualTo(HttpStatus.OK)
|
||||
.expectBody().isEmpty();
|
||||
client.get().uri("/commit").exchange().expectStatus();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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".
|
||||
|
||||
# GSON ({sc-spring-boot-autoconfigure}/gson/GsonProperties.{sc-ext}[GsonProperties])
|
||||
spring.gson.date-format= # The 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.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-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.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.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.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])
|
||||
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]]
|
||||
== 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
|
||||
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.
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ TIP: See the "`<<howto-create-a-deployable-war-file>>`" section for more details
|
||||
create a deployable war file.
|
||||
|
||||
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
|
||||
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
|
||||
the `EntityManagerFactory`. This takes precedence to anything that is applied by the
|
||||
auto-configuration.
|
||||
@@ -2486,7 +2486,7 @@ shown in the following example:
|
||||
</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.
|
||||
|
||||
The following example does the same with Gradle:
|
||||
@@ -2742,7 +2742,7 @@ for the library, as follows:
|
||||
[[howto-remote-debug-maven-run]]
|
||||
=== 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
|
||||
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
|
||||
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-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-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-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-reference: http://docs.spring.io/spring/docs/{spring-docs-version}/spring-framework-reference/
|
||||
:spring-rest-docs: http://projects.spring.io/spring-restdocs/
|
||||
: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]]
|
||||
==== 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:
|
||||
|
||||
[cols="1,4"]
|
||||
|
||||
@@ -1782,7 +1782,7 @@ _<<getting-started.adoc#getting-started-first-application, Getting started>>_ se
|
||||
=== The "`Spring Web MVC Framework`"
|
||||
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
|
||||
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.
|
||||
|
||||
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.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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
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:
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
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
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
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
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
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
|
||||
|
||||
@@ -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}.
|
||||
* @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
|
||||
*/
|
||||
public boolean isAsyncSupported() {
|
||||
|
||||
@@ -246,8 +246,8 @@ public class ServletContextInitializerBeans
|
||||
}
|
||||
|
||||
/**
|
||||
* Adapter to convert a given Bean type into a {@link DynamicRegistrationBean} (and
|
||||
* hence a {@link ServletContextInitializer}.
|
||||
* Adapter to convert a given Bean type into a {@link RegistrationBean} (and
|
||||
* hence a {@link ServletContextInitializer}).
|
||||
*/
|
||||
private interface RegistrationBeanAdapter<T> {
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class SampleSecureWebFluxCustomSecurityTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void healthAndInfoDontRequireAuthentication() {
|
||||
public void healthAndInfoDoNotRequireAuthentication() {
|
||||
this.webClient.get().uri("/actuator/health").accept(MediaType.APPLICATION_JSON)
|
||||
.exchange().expectStatus().isOk();
|
||||
this.webClient.get().uri("/actuator/info").accept(MediaType.APPLICATION_JSON)
|
||||
|
||||
Reference in New Issue
Block a user