<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SpringBoot - 标签 | 飞污熊小站</title><link>https://xiongneng.me/tags/springboot/</link><description>飞污熊小站</description><generator>Hugo 0.161.1 &amp; FixIt v0.4.6-20260512073637-464c4659</generator><language>zh-CN</language><managingEditor>yidao620@163.com (XiongNeng)</managingEditor><webMaster>yidao620@163.com (XiongNeng)</webMaster><copyright>XiongNeng</copyright><lastBuildDate>Sun, 17 May 2026 13:14:48 +0000</lastBuildDate><atom:link href="https://xiongneng.me/tags/springboot/index.xml" rel="self" type="application/rss+xml"/><item><title>SpringBoot系列 - 集成Echarts导出图片</title><link>https://xiongneng.me/posts/java/springboot/sb-echarts/</link><pubDate>Sat, 19 Aug 2017 15:17:28 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-echarts/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;Echarts是百度一款开源可视化图表库，基于html5 Canvas的。能够快速让你看到漂亮的效果。也是百度开源产品中的良心之作。&lt;/p&gt;
&lt;p&gt;有时候在Java程序中也需要导出好看的图表，比如我经常会基于JMH做各种微基准测试，想将测试结果可视化导出为图表形式。
试用了一下JFreeChart，跟Echarts导出的图比起来还是弱了不少。但是Echarts是基于js的，只能在浏览器中解析和导出图片，怎么办呢？&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 使用消息队列RabbitMQ</title><link>https://xiongneng.me/posts/java/springboot/sb-rabbitmq/</link><pubDate>Sun, 06 Aug 2017 12:33:21 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-rabbitmq/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;RabbitMQ 即一个消息队列，主要是用来实现应用程序的异步和解耦，同时也能起到消息缓冲，消息分发的作用。&lt;/p&gt;
&lt;p&gt;RabbitMQ是实现AMQP（高级消息队列协议）的消息中间件的一种，AMQP，即Advanced Message Queuing Protocol，
高级消息队列协议，是应用层协议的一个开放标准，为面向消息的中间件设计。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 批处理</title><link>https://xiongneng.me/posts/java/springboot/sb-batch/</link><pubDate>Tue, 01 Aug 2017 19:10:22 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-batch/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;Spring Batch是一个轻量级的框架,完全面向Spring的批处理框架,用于企业级大量的数据读写处理系统。以POJO和Spring 框架为基础，
包括日志记录/跟踪，事务管理、 作业处理统计工作重新启动、跳过、资源管理等功能。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - Redis数据库</title><link>https://xiongneng.me/posts/java/springboot/sb-redis/</link><pubDate>Sun, 30 Jul 2017 12:21:58 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-redis/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;在互联网场景下，尤其 2C 端大流量场景下，需要将一些经常展现和不会频繁变更的数据，存放在存取速率更快的地方。
缓存就是一个存储器，在技术选型中，常用 Redis 作为缓存数据库。缓存主要是在获取资源方便性能优化的关键方面。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 缓存</title><link>https://xiongneng.me/posts/java/springboot/sb-cache/</link><pubDate>Fri, 28 Jul 2017 20:12:33 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-cache/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;内存的速度远远大于硬盘的速度，当我们需要重复获取相同的数据的时候，一次又一次的请求数据库或远程服务，
导致大量时间都消耗在数据库查询或远程方法调用上面，性能下降，这时候就需要使用到缓存技术了。&lt;/p&gt;
&lt;p&gt;本文介绍SpringBoot 如何使用redis做缓存，如何对redis缓存进行定制化配置(如key的有效期)以及初始化redis做缓存。
使用具体的代码介绍了&lt;code&gt;@Cacheable&lt;/code&gt;，&lt;code&gt;@CacheEvict&lt;/code&gt;，&lt;code&gt;@CachePut&lt;/code&gt;，&lt;code&gt;@CacheConfig&lt;/code&gt;等注解及其属性的用法。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 声明式事务</title><link>https://xiongneng.me/posts/java/springboot/sb-transaction/</link><pubDate>Wed, 26 Jul 2017 15:55:36 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-transaction/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;所有数据访问技术都有事务机制，这些技术提供了API来开启事务、提交事务完成数据操作，或者在发生错误的时候回滚数据。&lt;/p&gt;
&lt;p&gt;Spring采用统一的机制来处理不同的数据访问技术的事务，
Spring的事务提供一个&lt;code&gt;PlatformTransactionManager&lt;/code&gt;的接口，不同的数据访问技术使用不同的接口实现。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 使用AOP</title><link>https://xiongneng.me/posts/java/springboot/sb-aop/</link><pubDate>Mon, 24 Jul 2017 22:26:19 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-aop/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;AOP（面向切面编程）是Spring的两大核心功能之一，功能非常强大，为解耦提供了非常优秀的解决方案。
现在就以springboot中aop的使用来了解一下如何使用aop。
写几个简单的Spring RESTful服务接口方法，实现方法前面或后面打印日志。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 自己写starter</title><link>https://xiongneng.me/posts/java/springboot/sb-starter/</link><pubDate>Sat, 22 Jul 2017 16:22:19 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-starter/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;Spring Boot由众多Starter组成，随着版本的推移Starter家族成员也与日俱增。在传统Maven项目中通常将一些层、组件拆分为模块来管理，
以便相互依赖复用，在Spring Boot项目中我们则可以创建自定义Spring Boot Starter来达成该目的。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 异步线程池</title><link>https://xiongneng.me/posts/java/springboot/sb-async/</link><pubDate>Thu, 20 Jul 2017 12:56:22 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-async/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;在项目中，当访问其他人的接口较慢或者做耗时任务时，不想程序一直卡在耗时任务上，想程序能够并行执行，
我们可以使用多线程来并行的处理任务，也可以使用spring提供的异步处理方式@Async。&lt;/p&gt;
&lt;p&gt;Spring异步线程池的接口类，其实质是&lt;code&gt;java.util.concurrent.Executor&lt;/code&gt;。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成SocketIO实时通信</title><link>https://xiongneng.me/posts/java/springboot/sb-socketio/</link><pubDate>Sun, 16 Jul 2017 19:09:58 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-socketio/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;上一篇讲解了基于STOMP协议实现的WebSocket方案，本篇我讲一下Socket.IO的实现方案。&lt;/p&gt;
&lt;p&gt;Socket.IO 主要使用WebSocket协议。但是如果需要的话，Socket.io可以回退到几种其它方法，
例如Adobe Flash Sockets、JSONP拉取、或是传统的AJAX拉取，并且提供完全相同的接口。
尽管它可以被用作WebSocket的包装库，它还是提供了许多其它功能，比如广播至多个套接字，存储与不同客户有关的数据，和异步IO操作。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成WebSocket实时通信</title><link>https://xiongneng.me/posts/java/springboot/sb-websocket/</link><pubDate>Sat, 15 Jul 2017 12:28:16 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-websocket/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;WebSocket是 HTML5 开始提供的一种浏览器与服务器间进行全双工通讯的网络技术。
WebSocket 通信协议于2011年被IETF定为标准RFC 6455，WebSocketAPI 被W3C定为标准。
在WebSocket API 中，浏览器和服务器只需要要做一个握手的动作，然后，浏览器和服务器之间就形成了一条快速通道。
两者之间就直接可以数据互相传送。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - cxf实现WebService</title><link>https://xiongneng.me/posts/java/springboot/sb-cxf/</link><pubDate>Thu, 13 Jul 2017 18:25:37 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-cxf/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;说起web service最近几年restful大行其道，大有取代传统soap web service的趋势，
但是一些特有或相对老旧的系统依然使用了传统的soap web service，例如银行、航空公司的机票查询接口等。
本篇主要讲解spring boot整合cxf发布webservice服务和spring boot整合cxf客户端调用webservice服务。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 定时任务</title><link>https://xiongneng.me/posts/java/springboot/sb-schedule/</link><pubDate>Wed, 12 Jul 2017 10:59:25 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-schedule/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;很多时候，我们需要在每天的某个固定时间或者每隔一段时间让应用去执行某一个任务。
为了实现这个需求，通常我们会通过多线程来实现这个功能，但是这样我们需要自己做一些比较麻烦的工作。
接下来，让我们看看如何使用Spring scheduling task简化定时任务功能的实现。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 多数据源配置</title><link>https://xiongneng.me/posts/java/springboot/sb-multisource/</link><pubDate>Mon, 10 Jul 2017 17:32:56 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-multisource/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;项目中经常会出现需要同时连接两个数据源的情况，这里还是演示基于MyBatis来配置两个数据源，并演示如何切换不同的数据源。&lt;/p&gt;
&lt;p&gt;网上的一些例子都写的有点冗余，这里我通过自定义注解+AOP的方式，来简化这种数据源的切换操作。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成JWT实现接口权限认证</title><link>https://xiongneng.me/posts/java/springboot/sb-jwt/</link><pubDate>Sun, 09 Jul 2017 20:12:22 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-jwt/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;一般来讲，对于RESTful API都会有认证(Authentication)和授权(Authorization)过程，保证API的安全性。&lt;/p&gt;
&lt;p&gt;Authentication指的是确定这个用户的身份，Authorization是确定该用户拥有什么操作权限。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成Swagger2</title><link>https://xiongneng.me/posts/java/springboot/sb-swagger2/</link><pubDate>Sat, 08 Jul 2017 15:26:19 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-swagger2/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;Swagger是一个简单但功能强大的API表达工具。它具有地球上最大的API工具生态系统，数以千计的开发人员，
使用几乎所有的现代编程语言，都在支持和使用Swagger。使用Swagger生成API，我们可以得到交互式文档，
自动生成代码的SDK以及API的发现特性等。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成Shiro权限管理</title><link>https://xiongneng.me/posts/java/springboot/sb-shiro/</link><pubDate>Fri, 07 Jul 2017 09:56:08 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-shiro/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;&lt;code&gt;Apache Shiro&lt;/code&gt;是Java的一个安全框架。目前，使用&lt;code&gt;Apache Shiro&lt;/code&gt;的人越来越多，相比&lt;code&gt;Spring Security&lt;/code&gt;而言相当简单，
可能没有&lt;code&gt;Spring Security&lt;/code&gt;做的功能强大，但是在实际工作时可能并不需要那么复杂的东西，
所以使用小而简单的Shiro就足够了。对于它俩到底哪个好，这个不必纠结，能更简单的解决项目问题就好了。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 使用RestTemplate</title><link>https://xiongneng.me/posts/java/springboot/sb-restclient/</link><pubDate>Thu, 06 Jul 2017 18:29:52 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-restclient/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;spring框架提供的RestTemplate类可用于在应用中调用rest服务，它简化了与http服务的通信方式，统一了RESTful的标准，封装了http链接，
我们只需要传入url及返回值类型即可。相较于之前常用的HttpClient，RestTemplate是一种更优雅的调用RESTful服务的方式。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 实现RESTful接口</title><link>https://xiongneng.me/posts/java/springboot/sb-restful/</link><pubDate>Wed, 05 Jul 2017 12:10:37 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-restful/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;REST，即Representational State Transfer的缩写，对这个词组的翻译是&lt;code&gt;表现层状态转化&lt;/code&gt;。&lt;/p&gt;
&lt;p&gt;RESTful是一种软件设计风格，就是目前最流行的一种互联网软件架构。它结构清晰、符合标准、易于理解、扩展方便，所以正得到越来越多网站的采用。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成MongoDB</title><link>https://xiongneng.me/posts/java/springboot/sb-mongodb/</link><pubDate>Tue, 04 Jul 2017 12:25:38 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-mongodb/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;MongoDB是一个高性能、开源、无模式的文档型数据库，是当前NoSql数据库中比较热门的一种。
适合对大量或者无固定格式的数据进行存储，比如：日志、缓存等。对事物支持较弱，不适用复杂的多文档（多表）的级联查询。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成Hibernate</title><link>https://xiongneng.me/posts/java/springboot/sb-hibernate/</link><pubDate>Mon, 03 Jul 2017 14:41:39 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-hibernate/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;Hibernate与MyBatis都是流行的持久层开发框架，前一遍介绍了怎样在SpringBoot中集成MyBatis，本篇来介绍如何集成Hibernate作为DAO层。&lt;/p&gt;
&lt;p&gt;Hibernate 是一个高性能的对象/关系映射（ORM）持久化存储和查询的服务，不仅负责从Java类到数据库表的映射
（还包括从Java数据类型到SQL数据类型的映射），还提供了面向对象的数据查询检索机制，从而极大地缩短了手动处理SQL和JDBC上的开发时间。
同时，Hibernate还实现了JPA规范，在SpringBoot中，JPA的默认实现就是使用的Hibernate。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成MyBatis</title><link>https://xiongneng.me/posts/java/springboot/sb-mybatis/</link><pubDate>Sun, 02 Jul 2017 10:23:53 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-mybatis/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;MyBatis 是一款优秀的持久层框架，它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。
MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息，将接口和 Java 的 POJOs映射成数据库中的记录。&lt;/p&gt;</description></item><item><title>SpringBoot系列 - 集成Thymeleaf构建Web应用</title><link>https://xiongneng.me/posts/java/springboot/sb-thymeleaf/</link><pubDate>Sat, 01 Jul 2017 18:17:29 +0800</pubDate><author>yidao620@163.com (XiongNeng)</author><guid>https://xiongneng.me/posts/java/springboot/sb-thymeleaf/</guid><category domain="https://xiongneng.me/categories/java/">Java</category><description>&lt;p&gt;Thymeleaf 是一个跟 Velocity、FreeMarker 类似的模板引擎，它可以完全替代 JSP 。相较与其他的模板引擎，它有如下三个极吸引人的特点：&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Thymeleaf 在有网络和无网络的环境下皆可运行，即它可以让美工在浏览器查看页面的静态效果，也可以让程序员在服务器查看带数据的动态页面效果。&lt;/li&gt;
&lt;li&gt;Thymeleaf 开箱即用的特性。它提供标准和spring标准两种方言，可以直接套用模板实现JSTL、 OGNL表达式效果，避免每天套模板、该jstl、改标签的困扰。&lt;/li&gt;
&lt;li&gt;Thymeleaf 提供spring标准方言和一个与 SpringMVC 完美集成的可选模块，可以快速的实现表单绑定、属性编辑器、国际化等功能。&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;目前最新版本是Thymeleaf 3，官网地址：&lt;a href="http://www.thymeleaf.org" target="_blank" rel="external nofollow noopener noreferrer"&gt;http://www.thymeleaf.org&lt;i class="fa-solid fa-external-link-alt fa-xs ms-1 text-secondary" aria-hidden="true"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>