Spring Boot 2.0 animated Banner

Spring Boot is a new framework provided by the Pivotal team, which is designed to simplify the initial construction and development process of new spring applications. v2.0.0.RELEASE It was officially released yesterday.

Preface

This article introduces an interesting feature animation Banner of Spring Boot 2.0; (of course, it is useless in actual development, just for fun)

Get ready

  • JDK 1.8 or later
  • Maven 3 or later

Technology stack

  • Spring Boot 2.0

directory structure

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>cn.merryyou</groupId>
	<artifactId>animated-banner</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>animated-banner</name>
	<description>A very useful project to demonstrate animated gif support in Spring Boot 2</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.0.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<includeSystemScope>true</includeSystemScope>
				</configuration>
			</plugin>
		</plugins>
	</build>


</project>

Pack Project

Console launch item (MAC)

java -jar animated-banner-0.0.1-SNAPSHOT.jar

The effect is as follows:

Code download

Download from my github, https://github.com/longfeizheng/animated-banner

Pay attention to the course of java Architect of wechat applet Is the commute boring? Still reading novels and news? Don't know how to improve your technology? Come on, here are the Java architecture articles you need. 1.5w + java engineers are reading them. What are you waiting for?

Tags: Spring Maven Java Apache

Posted on Wed, 01 Apr 2020 21:40:11 -0700 by mpiaser