From c9a3880f278c95b59267c711942fa6e2fee95b00 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 22 Aug 2016 15:39:41 +0200 Subject: [PATCH] Remove hard-coded property values As of Spring Boot 1.4, IDEs are supposed to provide auto-completion for hints and enum values. This commit removes the hard-coded copy of allowed values for enum-based properties. This was mostly the case already and this commit fixes the few ones remaining. Closes gh-6654 --- .../boot/autoconfigure/jersey/JerseyProperties.java | 2 +- .../boot/autoconfigure/jms/artemis/ArtemisProperties.java | 3 +-- .../boot/autoconfigure/jms/hornetq/HornetQProperties.java | 3 +-- .../main/asciidoc/appendix-application-properties.adoc | 8 ++++---- .../additional-spring-configuration-metadata.json | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java index 686bce55ca..f66daadeda 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jersey/JerseyProperties.java @@ -33,7 +33,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class JerseyProperties { /** - * Jersey integration type. Can be either "servlet" or "filter". + * Jersey integration type. */ private Type type = Type.SERVLET; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisProperties.java index 2c59e06d42..6361809d89 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/artemis/ArtemisProperties.java @@ -36,8 +36,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class ArtemisProperties { /** - * Artemis deployment mode, auto-detected by default. Can be explicitly set to - * "native" or "embedded". + * Artemis deployment mode, auto-detected by default. */ private ArtemisMode mode; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java index 1181bca199..f8beed2b3f 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/hornetq/HornetQProperties.java @@ -37,8 +37,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; public class HornetQProperties { /** - * HornetQ deployment mode, auto-detected by default. Can be explicitly set to - * "native" or "embedded". + * HornetQ deployment mode, auto-detected by default. */ private HornetQMode mode; diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 7f48424834..afa38fc62d 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -121,7 +121,7 @@ content into your application; rather pick only the properties that you need. spring.messages.fallback-to-system-locale=true # Set whether to fall back to the system Locale if no files for a specific Locale have been found. # OUTPUT - spring.output.ansi.enabled=detect # Configure the ANSI output (can be "detect", "always", "never"). + spring.output.ansi.enabled=detect # Configure the ANSI output. # PID FILE ({sc-spring-boot-actuator}/system/ApplicationPidFileWriter.{sc-ext}[ApplicationPidFileWriter]) spring.pid.fail-on-write-error= # Fail if ApplicationPidFileWriter is used but it cannot write the PID file. @@ -303,7 +303,7 @@ content into your application; rather pick only the properties that you need. spring.jersey.filter.order=0 # Jersey filter chain order. spring.jersey.init.*= # Init parameters to pass to Jersey via the servlet or filter. spring.jersey.servlet.load-on-startup=-1 # Load on startup priority of the Jersey servlet. - spring.jersey.type=servlet # Jersey integration type. Can be either "servlet" or "filter". + spring.jersey.type=servlet # Jersey integration type. # SPRING MOBILE DEVICE VIEWS ({sc-spring-boot-autoconfigure}/mobile/DeviceDelegatingViewResolverAutoConfiguration.{sc-ext}[DeviceDelegatingViewResolverAutoConfiguration]) spring.mobile.devicedelegatingviewresolver.enable-fallback=false # Enable support for fallback resolution. @@ -839,7 +839,7 @@ content into your application; rather pick only the properties that you need. spring.artemis.embedded.server-id= # Server id. By default, an auto-incremented counter is used. spring.artemis.embedded.topics= # Comma-separated list of topics to create on startup. spring.artemis.host=localhost # Artemis broker host. - spring.artemis.mode= # Artemis deployment mode, auto-detected by default. Can be explicitly set to "native" or "embedded". + spring.artemis.mode= # Artemis deployment mode, auto-detected by default. spring.artemis.password= # Login password of the broker. spring.artemis.port=61616 # Artemis broker port. spring.artemis.user= # Login user of the broker. @@ -860,7 +860,7 @@ content into your application; rather pick only the properties that you need. spring.hornetq.embedded.server-id= # Server id. By default, an auto-incremented counter is used. spring.hornetq.embedded.topics= # Comma-separated list of topics to create on startup. spring.hornetq.host=localhost # HornetQ broker host. - spring.hornetq.mode= # HornetQ deployment mode, auto-detected by default. Can be explicitly set to "native" or "embedded". + spring.hornetq.mode= # HornetQ deployment mode, auto-detected by default. spring.hornetq.password= # Login password of the broker. spring.hornetq.port=5445 # HornetQ broker port. spring.hornetq.user= # Login user of the broker. diff --git a/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index afd248134d..d2064f813f 100644 --- a/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -175,7 +175,7 @@ { "name": "spring.output.ansi.enabled", "type": "org.springframework.boot.ansi.AnsiOutput$Enabled", - "description": "Configure the ANSI output (can be \"detect\", \"always\", \"never\").", + "description": "Configure the ANSI output.", "defaultValue": "detect" }, {