From 3d619da553a4bd9b4da59f11bb3d48dbffcec484 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 25 Jan 2017 16:56:22 -0800 Subject: [PATCH] Polish --- .../gradle/SpringBootPluginExtension.java | 6 +++- .../boot/loader/tools/Layouts.java | 2 +- .../boot/maven/RepackageMojo.java | 2 +- .../env/DunnoEnumerablePropertySource.java | 23 +++++++++++++++ .../boot/env/DunnoPropertySource.java | 28 +++++++++++++++++++ 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 spring-boot/src/main/java/org/springframework/boot/env/DunnoEnumerablePropertySource.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/env/DunnoPropertySource.java diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java index 764a90a358..100cfd63a2 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/SpringBootPluginExtension.java @@ -304,7 +304,11 @@ public class SpringBootPluginExtension { DIR(new Layouts.Expanded()), - @SuppressWarnings("deprecation") MODULE(new Layouts.Module()), + /** + * Module Layout. + * @deprecated as of 1.5 in favor of a custom {@link LayoutFactory} + */ + @Deprecated MODULE(new Layouts.Module()), NONE(new Layouts.None()); diff --git a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java index 9901d3c958..e7a0ebc679 100644 --- a/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java +++ b/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/Layouts.java @@ -158,7 +158,7 @@ public final class Layouts { /** * Module layout (designed to be used as a "plug-in"). - * @deprecated since 1.5 in favour of a custom {@link LayoutFactory} + * @deprecated as of 1.5 in favor of a custom {@link LayoutFactory} */ @Deprecated public static class Module implements Layout { diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index 5228e210a7..e055f2c810 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -348,7 +348,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { /** * Module Layout. - * @deprecated since 1.5 in favour of a custom {@link LayoutFactory} + * @deprecated as of 1.5 in favor of a custom {@link LayoutFactory} */ @Deprecated MODULE(new Layouts.Module()), diff --git a/spring-boot/src/main/java/org/springframework/boot/env/DunnoEnumerablePropertySource.java b/spring-boot/src/main/java/org/springframework/boot/env/DunnoEnumerablePropertySource.java new file mode 100644 index 0000000000..81955e3a76 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/env/DunnoEnumerablePropertySource.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.boot.env; +/** + * @author pwebb + */ +public interface DunnoEnumerablePropertySource { + +} diff --git a/spring-boot/src/main/java/org/springframework/boot/env/DunnoPropertySource.java b/spring-boot/src/main/java/org/springframework/boot/env/DunnoPropertySource.java new file mode 100644 index 0000000000..628888a107 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/env/DunnoPropertySource.java @@ -0,0 +1,28 @@ +/* + * Copyright 2012-2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.boot.env; + +/** + * @author pwebb + */ +public interface DunnoPropertySource { + + boolean containsProperty(String name); + + Object getProperty(String name); + +}