Browse Source

Polish

pull/47720/head
Stéphane Nicoll 2 months ago
parent
commit
1b1801adb1
  1. 4
      cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java
  2. 6
      configuration-metadata/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ConfigurationMetadataRepositoryJsonBuilder.java
  3. 2
      configuration-metadata/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/JsonReader.java
  4. 2
      module/spring-boot-http-converter/src/main/resources/META-INF/additional-spring-configuration-metadata.json
  5. 2
      module/spring-boot-jackson2/src/main/java/org/springframework/boot/jackson2/JsonMixinModuleEntries.java

4
cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitializrService.java

@ -51,14 +51,14 @@ class InitializrService {
private static final String FILENAME_HEADER_PREFIX = "filename=\""; private static final String FILENAME_HEADER_PREFIX = "filename=\"";
/** /**
* Accept header to use to retrieve the json meta-data. * Accept header to use to retrieve the JSON meta-data.
*/ */
public static final String ACCEPT_META_DATA = "application/vnd.initializr.v2.1+" public static final String ACCEPT_META_DATA = "application/vnd.initializr.v2.1+"
+ "json,application/vnd.initializr.v2+json"; + "json,application/vnd.initializr.v2+json";
/** /**
* Accept header to use to retrieve the service capabilities of the service. If the * Accept header to use to retrieve the service capabilities of the service. If the
* service does not offer such feature, the json meta-data are retrieved instead. * service does not offer such feature, the JSON meta-data are retrieved instead.
*/ */
public static final String ACCEPT_SERVICE_CAPABILITIES = "text/plain," + ACCEPT_META_DATA; public static final String ACCEPT_SERVICE_CAPABILITIES = "text/plain," + ACCEPT_META_DATA;

6
configuration-metadata/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/ConfigurationMetadataRepositoryJsonBuilder.java

@ -45,7 +45,7 @@ public final class ConfigurationMetadataRepositoryJsonBuilder {
/** /**
* Add the content of a {@link ConfigurationMetadataRepository} defined by the * Add the content of a {@link ConfigurationMetadataRepository} defined by the
* specified {@link InputStream} json document using the default charset. If this * specified {@link InputStream} JSON document using the default charset. If this
* metadata repository holds items that were loaded previously, these are ignored. * metadata repository holds items that were loaded previously, these are ignored.
* <p> * <p>
* Leaves the stream open when done. * Leaves the stream open when done.
@ -59,7 +59,7 @@ public final class ConfigurationMetadataRepositoryJsonBuilder {
/** /**
* Add the content of a {@link ConfigurationMetadataRepository} defined by the * Add the content of a {@link ConfigurationMetadataRepository} defined by the
* specified {@link InputStream} json document using the specified {@link Charset}. If * specified {@link InputStream} JSON document using the specified {@link Charset}. If
* this metadata repository holds items that were loaded previously, these are * this metadata repository holds items that were loaded previously, these are
* ignored. * ignored.
* <p> * <p>
@ -142,7 +142,7 @@ public final class ConfigurationMetadataRepositoryJsonBuilder {
/** /**
* Create a new builder instance using {@link StandardCharsets#UTF_8} as the default * Create a new builder instance using {@link StandardCharsets#UTF_8} as the default
* charset and the specified json resource. * charset and the specified JSON resource.
* @param inputStreams the source input streams * @param inputStreams the source input streams
* @return a new {@link ConfigurationMetadataRepositoryJsonBuilder} instance. * @return a new {@link ConfigurationMetadataRepositoryJsonBuilder} instance.
* @throws IOException on error * @throws IOException on error

2
configuration-metadata/spring-boot-configuration-metadata/src/main/java/org/springframework/boot/configurationmetadata/JsonReader.java

@ -29,7 +29,7 @@ import org.springframework.boot.configurationmetadata.json.JSONArray;
import org.springframework.boot.configurationmetadata.json.JSONObject; import org.springframework.boot.configurationmetadata.json.JSONObject;
/** /**
* Read standard json metadata format as {@link ConfigurationMetadataRepository}. * Read standard JSON metadata format as {@link ConfigurationMetadataRepository}.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */

2
module/spring-boot-http-converter/src/main/resources/META-INF/additional-spring-configuration-metadata.json

@ -4,7 +4,7 @@
"name": "spring.http.converters.preferred-json-mapper", "name": "spring.http.converters.preferred-json-mapper",
"type": "java.lang.String", "type": "java.lang.String",
"defaultValue": "jackson", "defaultValue": "jackson",
"description": "Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment. Supported values are 'jackson', 'jackson2' (deprecated), 'gson', 'jsonb' and 'kotlin-serialization'. When other json mapping libraries are present, use a custom HttpMessageConverters bean to control the preferred mapper." "description": "Preferred JSON mapper to use for HTTP message conversion. By default, auto-detected according to the environment. Supported values are 'jackson', 'jackson2' (deprecated), 'gson', 'jsonb' and 'kotlin-serialization'. When other JSON mapping libraries are present, use a custom HttpMessageConverters bean to control the preferred mapper."
} }
], ],
"hints": [ "hints": [

2
module/spring-boot-jackson2/src/main/java/org/springframework/boot/jackson2/JsonMixinModuleEntries.java

@ -37,7 +37,7 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
/** /**
* Provide the mapping of json mixin class to consider. * Provide the mapping of JSON mixin class to consider.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 4.0.0 * @since 4.0.0

Loading…
Cancel
Save