![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring
文章平均质量分 62
经年JN
这个作者很懒,什么都没留下…
展开
-
# Spring系列 - FactoryBean
FactoryBean原创 2022-07-07 14:29:42 · 227 阅读 · 0 评论 -
SpringMVC整合FastJson实现RestFul风格API
首先,直接来web.xml文件<?xml version="1.0" encoding="utf-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLo原创 2016-02-03 11:03:31 · 7341 阅读 · 2 评论 -
# Spring实战系列 - Aspect 五种通知切面通知执行顺序
日常开发中经常会使用到 Spring AOP,通知类型有:Around、Before、After、AfterReturning、AfterThrowing ,本文主要讲解五种通知都有时,正常和异常情况下的执行顺序,以及多个切面存在时,执行顺序如何 正常逻辑代码 接口定义如下 public interface UserService { void saveUser(); ...原创 2020-04-17 15:46:22 · 1360 阅读 · 0 评论 -
# Spring系列 - Bean 生命周期
网上已有许多讲解 Spring Bean 生命周期的文章,但大多都是文字,看起来费劲,本文通过图的形式展现 Bean 的完整生命周期 废话不多说,直接看下图原创 2020-04-15 10:58:24 · 113 阅读 · 0 评论 -
# Spring实战系列 - 干掉 if else
项目开发过程中,有时经常需要根据不同的条件做不同的事情,于是 if else 代码到处都是,本文就来讲讲如何优雅干掉难缠的 if else 先来看看使用 if else 的情况 以支付为例,代码如下 @Service public class PayService { /** * 支付 * * @param orderInfo * @par...原创 2020-03-30 10:53:52 · 196 阅读 · 0 评论 -
# Spring系列 - 事务传播特性
事务传播 REQUIRED SUPPORTS MANDATORY REQUIRES_NEW NOT_SUPPORTED NEVER NESTED 伪代码 1: @Service public class UserOneManagerImpl implements UserOneManager { @Transactional(rollbackFor = Exception.class) ...原创 2018-10-31 23:28:50 · 214 阅读 · 0 评论