diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java
index a97604e9ba..dbf6be24fd 100644
--- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java
+++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/ImageBannerTests.java
@@ -165,6 +165,17 @@ public class ImageBannerTests {
}
}
+ @Test
+ public void printBannerWhenAnimatesShouldPrintAllFrames() throws Exception {
+ AnsiOutput.setEnabled(AnsiOutput.Enabled.NEVER);
+ String banner = printBanner("animated.gif");
+ String[] lines = banner.split(NEW_LINE);
+ int frames = 138;
+ int linesPerFrame = 36;
+ assertThat(banner).contains("\r");
+ assertThat(lines.length).isEqualTo(frames * linesPerFrame - 1);
+ }
+
private int getBannerHeight(String banner) {
return banner.split(NEW_LINE).length - 3;
}
diff --git a/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/animated.gif b/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/animated.gif
new file mode 100644
index 0000000000..104a96af51
Binary files /dev/null and b/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/animated.gif differ
diff --git a/spring-boot-samples/pom.xml b/spring-boot-samples/pom.xml
index aabcb4cf45..51f5dbed35 100644
--- a/spring-boot-samples/pom.xml
+++ b/spring-boot-samples/pom.xml
@@ -25,6 +25,7 @@
spring-boot-sample-actuator-ui
spring-boot-sample-actuator-custom-security
spring-boot-sample-amqp
+ spring-boot-sample-animated-banner
spring-boot-sample-aop
spring-boot-sample-atmosphere
spring-boot-sample-batch
diff --git a/spring-boot-samples/spring-boot-sample-animated-banner/pom.xml b/spring-boot-samples/spring-boot-sample-animated-banner/pom.xml
new file mode 100644
index 0000000000..d2867a0997
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-animated-banner/pom.xml
@@ -0,0 +1,38 @@
+
+
+ 4.0.0
+
+
+ org.springframework.boot
+ spring-boot-samples
+ ${revision}
+
+ spring-boot-sample-animated-banner
+ Spring Boot Simple Animated Banner
+ Spring Boot Simple Animated Banner
+
+ ${basedir}/../..
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
diff --git a/spring-boot-samples/spring-boot-sample-animated-banner/src/main/java/sample/animated/SampleAnimatedBannerApplication.java b/spring-boot-samples/spring-boot-sample-animated-banner/src/main/java/sample/animated/SampleAnimatedBannerApplication.java
new file mode 100644
index 0000000000..389c9011d2
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-animated-banner/src/main/java/sample/animated/SampleAnimatedBannerApplication.java
@@ -0,0 +1,29 @@
+/*
+ * 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 sample.animated;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SampleAnimatedBannerApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(SampleAnimatedBannerApplication.class, args);
+ }
+
+}
diff --git a/spring-boot-samples/spring-boot-sample-animated-banner/src/main/resources/banner.gif b/spring-boot-samples/spring-boot-sample-animated-banner/src/main/resources/banner.gif
new file mode 100644
index 0000000000..73f3182826
Binary files /dev/null and b/spring-boot-samples/spring-boot-sample-animated-banner/src/main/resources/banner.gif differ