前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Spring Boot 2.0 动画Banner

Spring Boot 2.0 动画Banner

作者头像
java干货
发布2021-02-19 11:10:34
5700
发布2021-02-19 11:10:34
举报
文章被收录于专栏:java干货

Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程。v2.0.0.RELEASE已于昨天正式发布。

前言

本篇文章介绍Spring Boot 2.0一个有趣的功能动画Banner;(当然,在实际开发中没有用处,just for fun)

准备

  • JDK 1.8 或更高版本
  • Maven 3 或更高版本

技术栈

  • Spring Boot 2.0

目录结构

https://raw.githubusercontent.com/longfeizheng/longfeizheng.github.io/master/images/springboot/springboot01.png
https://raw.githubusercontent.com/longfeizheng/longfeizheng.github.io/master/images/springboot/springboot01.png

pom.xml

代码语言:javascript
复制
<?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>

项目打包

https://raw.githubusercontent.com/longfeizheng/longfeizheng.github.io/master/images/springboot/springboot02.png
https://raw.githubusercontent.com/longfeizheng/longfeizheng.github.io/master/images/springboot/springboot02.png

控制台启动项目(MAC)

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

效果如下:

https://raw.githubusercontent.com/longfeizheng/longfeizheng.github.io/master/images/springboot/springboot-banners.gif
https://raw.githubusercontent.com/longfeizheng/longfeizheng.github.io/master/images/springboot/springboot-banners.gif

代码下载

从我的 github 中下载,https://github.com/longfeizheng/animated-banner

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018/03/02,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 前言
    • 准备
      • 技术栈
        • 目录结构
          • pom.xml
            • 项目打包
              • 控制台启动项目(MAC)
              • 代码下载
              领券
              问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档