Spring中基于XML的AOP配置详解

 更新时间:2020年10月27日 11:14:11   作者:weixin_44086832  
这篇文章主要介绍了Spring中基于XML的AOP配置,本文通过图文实例相结合给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下

1. 准备工作

1.1 创建工程 day03_eesy_03SpringAOP

1.2 在配置文件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>com.itheima</groupId>
 <artifactId>day03_eesy_03springAOP</artifactId>
 <version>1.0-SNAPSHOT</version>

 <packaging>jar</packaging>

 <dependencies>
 <dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-context</artifactId>
  <version>5.2.4.RELEASE</version>
 </dependency>

 <dependency>
  <groupId>org.aspectj</groupId>
  <artifactId>aspectjweaver</artifactId>
  <version>1.9.5</version>
 </dependency>
 </dependencies>
</project>

说明: aspect依赖是用来声明切入点坐标的

1.3 编写业务层代码

1.创建包 service

2.创建业务层接口IAccountService.java

/**
 * 账户的业务层接口
 */
public interface IAccountService {

 /**
 * 模拟保存账户
 */
 void saveAccount();

 /**
 * 模拟更新账户
 */
 void updateAccount(Integer i);
 /**
 * 模拟删除账户
 */
 int deleteAccount();
}

3.创建业务层实现类AccountServiceImpl.java

/**
 * 账户的业务层实现类
 */
public class AccountServiceImpl implements IAccountService {
 public void saveAccount() {
 System.out.println("执行了保存");
 }

 public void updateAccount(Integer i) {
 System.out.println("执行力更新");
 }

 public int deleteAccount() {
 System.out.println("执行了删除");
 return 0;
 }
}

4.创建日志类

​ 该类为用于记录日志的工具类,它里面提供了公共的代码(通知)

Logger.java

/**
 * 用于记录日志的工具类,它里面提供了公共的代码
 */
public class Logger {

 /**
 * 用于打印日志,计划让其在切入点方法执行之前执行(切入点方法就是业务层方法)
 */
 public void printLog(){
 System.out.println("Logger类中的printLog方法开始记录日志了");
 }
}

2. 进行配置

创建配置文件 bean.xml

先添加包含AOP的约束,后添加配置

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd">

 <!--配置Spring的IOC,把service对象配置进来-->
 <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl"></bean>

 <!--Spring中基于XML的AOP配置步骤
  1.把通知Bean也交给Spring来管理
  2.使用aop:config标签表明开始AOP的配置
  3.使用aop:aspect标签表明配置切面
   id属性: 是给切面提供唯一标识
   ref属性: 是指定通知类bean的id
  4.在aop:aspect标签的内部使用对应的标签来配置通知的类型
   我们现在的示例是让Logger类的printLog方法在切入点方法执行之前执行, 所以是前置通知
   aop:before : 表示配置前置通知
    method属性: 用于指定Logger类中哪个方法是前置通知
   pointcut属性: 用于指定切入点表达式,该表达式的含义指的是对业务层中哪些方法增强

  切入点表达式的写法:
   关键字: execution(表达式)
   表达式:
    访问修饰符 返回值 包名.包名.包名...类名.方法名(参数列表)
   标准的切入点表达式:
    public void com.itheima.service.impl.AccountServiceImpl.saveAccount()
 -->

 <!--配置Logger类-->
 <bean id="logger" class="com.itheima.utils.Logger"></bean>

 <!--配置AOP-->
 <aop:config>
 <!--配置切面-->
 <aop:aspect id="logAdvice" ref="logger">
  <!--配置通知的类型,并且建立通知方法和接入点方法的关联-->
  <aop:before method="printLog" pointcut="execution(public void com.itheima.service.impl.AccountServiceImpl.saveAccount())"></aop:before>
 </aop:aspect>
 </aop:config>

</beans>

说明: 切入点表达式最好按软件的提示写,自己直接手写在测试时容易报错

3. 创建测试类AOPTest.java

/**
 * 测试AOP的配置
 */
public class AOPTest {
 public static void main(String[] args) {
 //1.获取容器
 ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
 //2.获取对象
 IAccountService accountService = (IAccountService) applicationContext.getBean("accountService");
 accountService.saveAccount();
 }
}

4. 运行结果

5. 目录结构

6. 切入点表达式写法补充

6.1 介绍

<!-- 切入点表达式的写法:
   关键字: execution(表达式)
   表达式:
    访问修饰符 返回值 包名.包名.包名...类名.方法名(参数列表)
   标准的切入点表达式:
    public void com.itheima.service.impl.AccountServiceImpl.saveAccount()
   访问修饰符可以省略:
    void com.itheima.service.impl.AccountServiceImpl.saveAccount()
   返回值可以使用通配符,表示任意返回值
    * com.itheima.service.impl.AccountServiceImpl.saveAccount()
   包名可以使用通配符,表示任意包,但是又几级包,就需要写几个 *.
    * *.*.*.*.AccountServiceImpl.saveAccount()
   包名可以使用..表示当前包及其子包
    * *..AccountServiceImpl.saveAccount()
   类名和方法名都可以使用*来实现通配
    * *..*.*()
   参数列表:
    可以直接写数据类型:
    基本类型直接写名称  int
    引用类型写包名.类名的方式 java.lang.String
    可以使用通配符表示任意类型,但是必须有参数
    可以是使用..表示有无参数均可,有参数可以是任意类型
   全通配写法:
    * *..*.*(..)

   实际开发中切入点表达式的通常写法:
    切到业务层实现类下的所有的方法
    * com.itheima.service.impl.*.*(..)
-->

6.2 在bean.xml中表示

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd">

 <!--配置Spring的IOC,把service对象配置进来-->
 <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl"></bean>

 <!--Spring中基于XML的AOP配置步骤
  1.把通知Bean也交给Spring来管理
  2.使用aop:config标签表明开始AOP的配置
  3.使用aop:aspect标签表明配置切面
   id属性: 是给切面提供唯一标识
   ref属性: 是指定通知类bean的id
  4.在aop:aspect标签的内部使用对应的标签来配置通知的类型
   我们现在的示例是让Logger类的printLog方法在切入点方法执行之前执行, 所以是前置通知
   aop:before : 表示配置前置通知
    method属性: 用于指定Logger类中哪个方法是前置通知
   pointcut属性: 用于指定切入点表达式,该表达式的含义指的是对业务层中哪些方法增强

  切入点表达式的写法:
   关键字: execution(表达式)
   表达式:
    访问修饰符 返回值 包名.包名.包名...类名.方法名(参数列表)
   标准的切入点表达式:
    public void com.itheima.service.impl.AccountServiceImpl.saveAccount()
   访问修饰符可以省略:
    void com.itheima.service.impl.AccountServiceImpl.saveAccount()
   返回值可以使用通配符,表示任意返回值
    * com.itheima.service.impl.AccountServiceImpl.saveAccount()
   包名可以使用通配符,表示任意包,但是又几级包,就需要写几个 *.
    * *.*.*.*.AccountServiceImpl.saveAccount()
   包名可以使用..表示当前包及其子包
    * *..AccountServiceImpl.saveAccount()
   类名和方法名都可以使用*来实现通配
    * *..*.*()
   参数列表:
    可以直接写数据类型:
    基本类型直接写名称  int
    引用类型写包名.类名的方式 java.lang.String
    可以使用通配符表示任意类型,但是必须有参数
    可以是使用..表示有无参数均可,有参数可以是任意类型
   全通配写法:
    * *..*.*(..)

   实际开发中切入点表达式的通常写法:
    切到业务层实现类下的所有的方法
    * com.itheima.service.impl.*.*(..)

 -->

 <!--配置Logger类-->
 <bean id="logger" class="com.itheima.utils.Logger"></bean>

 <!--配置AOP-->
 <aop:config>
 <!--配置切面-->
 <aop:aspect id="logAdvice" ref="logger">
  <!--配置通知的类型,并且建立通知方法和接入点方法的关联-->
  <aop:before method="printLog" pointcut="execution(* com.itheima.service.impl.*.*(..))"></aop:before>
 </aop:aspect>
 </aop:config>

</beans>

6.3 在测试类AOPTest.java中测试

/**
 * 测试AOP的配置
 */
public class AOPTest {
 public static void main(String[] args) {
 //1.获取容器
 ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
 //2.获取对象
 IAccountService accountService = (IAccountService) applicationContext.getBean("accountService");
 accountService.saveAccount();
 accountService.updateAccount(1);
 accountService.deleteAccount();
 }
}

6.4 运行结果

7. 四种通知类型补充

 7.1 在Logger.java类中添加方法

/**
 * 用于记录日志的工具类,它里面提供了公共的代码
 */
public class Logger {

 /**
 * 前置通知
 */
 public void beforePrintLog(){
 System.out.println("前置通知:Logger类中的printLog方法开始记录日志了");
 }

 /**
 * 后置通知
 */
 public void afterReturningPrintLog(){
 System.out.println("后置通知:Logger类中的printLog方法开始记录日志了");
 }
 /**
 * 异常通知
 */
 public void afterThrowingPrintLog(){
 System.out.println("异常通知:Logger类中的printLog方法开始记录日志了");
 }
 /**
 * 最终通知
 */
 public void afterPrintLog(){
 System.out.println("最终通知:Logger类中的printLog方法开始记录日志了");
 }
}

7.2 在bean.xml中进行配置

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd">

 <!--配置Spring的IOC,把service对象配置进来-->
 <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl"></bean>


 <!--配置Logger类-->
 <bean id="logger" class="com.itheima.utils.Logger"></bean>

 <!--配置AOP-->
 <aop:config>
 <!--配置切面-->
 <aop:aspect id="logAdvice" ref="logger">
  <!--配置前置通知: 在切入点方法执行之前执行-->
  <aop:before method="beforePrintLog" pointcut="execution(public void com.itheima.service.impl.AccountServiceImpl.saveAccount())"></aop:before>

  <!--配置后通知: 在切入点方法正常执行之后执行; 他和异常通知只能执行一个-->
  <aop:after-returning method="afterReturningPrintLog" pointcut="execution(public void com.itheima.service.impl.AccountServiceImpl.saveAccount())"></aop:after-returning>

  <!--配置异常通知: 在切入点方法执行产生异常之后执行; 他和后置通知只能执行一个-->
  <aop:after-throwing method="afterThrowingPrintLog" pointcut="execution(public void com.itheima.service.impl.AccountServiceImpl.saveAccount())"></aop:after-throwing>

  <!--配置最终通知: 无论切入点方法是否正常执行他都会在其后面执行-->
  <aop:after method="afterPrintLog" pointcut="execution(public void com.itheima.service.impl.AccountServiceImpl.saveAccount())"></aop:after>
 </aop:aspect>
 </aop:config>

</beans>

7.3 在测试类AOPTest.java中运行

/**
 * 测试AOP的配置
 */
public class AOPTest {
 public static void main(String[] args) {
 //1.获取容器
 ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
 //2.获取对象
 IAccountService accountService = (IAccountService) applicationContext.getBean("accountService");
 accountService.saveAccount();

 }
}

7.4 运行结果

8. 通用化切入点表达式

用于解决在bean.xml文件中配置通知时多次写切入点表达式的问题

使用 aop:pointcut标签,在bean.xml中进行配置

8.1 在aop:aspect标签内部使用aop:pointcut

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd">

 <!--配置Spring的IOC,把service对象配置进来-->
 <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl"></bean>


 <!--配置Logger类-->
 <bean id="logger" class="com.itheima.utils.Logger"></bean>

 <!--配置AOP-->
 <aop:config>
 <!--配置切面-->
 <aop:aspect id="logAdvice" ref="logger">
  <!--配置前置通知: 在切入点方法执行之前执行-->
  <aop:before method="beforePrintLog" pointcut-ref="pt1"></aop:before>

  <!--配置后通知: 在切入点方法正常执行之后执行; 他和异常通知只能执行一个-->
  <aop:after-returning method="afterReturningPrintLog" pointcut-ref="pt1"></aop:after-returning>

  <!--配置异常通知: 在切入点方法执行产生异常之后执行; 他和后置通知只能执行一个-->
  <aop:after-throwing method="afterThrowingPrintLog" pointcut-ref="pt1"></aop:after-throwing>

  <!--配置最终通知: 无论切入点方法是否正常执行他都会在其后面执行-->
  <aop:after method="afterPrintLog" pointcut-ref="pt1"></aop:after>


  <!--配置切入点表达式 id属性用于指定表达式的唯一标识, expression属性用于指定表达式的内容
   此标签写在app:aspect标签内部,只能当前切面使用。
   它还可以写在aop:aspect外面, 此时就变成了所有切面可用
  -->
  <aop:pointcut id="pt1" expression="execution(* com.itheima.service.impl.AccountServiceImpl.*(..))"></aop:pointcut>
 </aop:aspect>
 </aop:config>

</beans>

运行结果:

此时,aop:pointcut定义的切入点表达式只能在当前切面中使用

8.2 在aop:aspect标签外部使用aop:pointcut

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd">

 <!--配置Spring的IOC,把service对象配置进来-->
 <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl"></bean>


 <!--配置Logger类-->
 <bean id="logger" class="com.itheima.utils.Logger"></bean>

 <!--配置AOP-->
 <aop:config>

 <!--配置切入点表达式 id属性用于指定表达式的唯一标识, expression属性用于指定表达式的内容
   此标签写在app:aspect标签内部,只能当前切面使用。
   它还可以写在aop:aspect外面, 此时就变成了所有切面可用
  -->
 <aop:pointcut id="pt1" expression="execution(* com.itheima.service.impl.AccountServiceImpl.*(..))"></aop:pointcut>
 
 <!--配置切面-->
 <aop:aspect id="logAdvice" ref="logger">
  <!--配置前置通知: 在切入点方法执行之前执行-->
  <aop:before method="beforePrintLog" pointcut-ref="pt1"></aop:before>

  <!--配置后通知: 在切入点方法正常执行之后执行; 他和异常通知只能执行一个-->
  <aop:after-returning method="afterReturningPrintLog" pointcut-ref="pt1"></aop:after-returning>

  <!--配置异常通知: 在切入点方法执行产生异常之后执行; 他和后置通知只能执行一个-->
  <aop:after-throwing method="afterThrowingPrintLog" pointcut-ref="pt1"></aop:after-throwing>

  <!--配置最终通知: 无论切入点方法是否正常执行他都会在其后面执行-->
  <aop:after method="afterPrintLog" pointcut-ref="pt1"></aop:after>
 </aop:aspect>
 </aop:config>

</beans>

运行结果:

此时所有的切面都能使用该aop:pointcut定义的切入点表达式

主要: 当在aop:aspect标签外部使用aop:pointcut标签定义切入点表达式的时候,由于使用的约束的规定, aop:pointcut标签只能在 aop:aspect标签上方

9. Spring的环绕通知

9.1 在Logger.java中添加实现环绕通知的方法 aroundPringLog

/**
 * 用于记录日志的工具类,它里面提供了公共的代码
 */
public class Logger {
 /**
 * 环绕通知
 *
 */
 public void aroundPringLog(){
  System.out.println("Logger类中的aroundPringLog方法开始记录日志了");
 }

}

9.2 在bean.xml中完成配置

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:aop="http://www.springframework.org/schema/aop"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop.xsd">

 <!--配置Spring的IOC,把service对象配置进来-->
 <bean id="accountService" class="com.itheima.service.impl.AccountServiceImpl"></bean>


 <!--配置Logger类-->
 <bean id="logger" class="com.itheima.utils.Logger"></bean>

 <!--配置AOP-->
 <aop:config>
 
 <aop:pointcut id="pt1" expression="execution(* com.itheima.service.impl.AccountServiceImpl.*(..))"></aop:pointcut>

 <!--配置切面-->
 <aop:aspect id="logAdvice" ref="logger">
  <!--配置环绕通知 详细的注释在Logger类中-->
  <aop:around method="aroundPringLog" pointcut-ref="pt1"></aop:around>
 </aop:aspect>
 </aop:config>

</beans>

9.3 此时运行结果

9.4 问题分析

此时只执行了通知方法,而切入点方法没有执行

原因:

​ 通过对比动态的代理中的环绕通知代码,发现动态代理的环绕通知有明确的切入点方法调用,而本案例中的代码没有

9.5 完善aroundPringLog方法

Logger.java

/**
 * 用于记录日志的工具类,它里面提供了公共的代码
 */
public class Logger {
 /**
 * 环绕通知
 * 问题:
 * 当我们配置了环绕通知之后,切入点方法没有执行,而通知方法执行了
 * 分析:
 * 通过对比动态的代理中的环绕通知代码,发现动态代理的环绕通知有明确的切入点方法调用,而我们的代码中没有
 * 解决:
 * Spring框架为我们提供了一个接口,ProceedingJoinPoint,该接口有一个方法proceed(),此方法就相当于明确调用切入点方法
 * 该接口可以作为环绕通知的方法参数, 在程序执行的时候,Spring框架会为我们提供该接口供我们使用
 *
 * Spring的环绕通知:
 * 他是Spring框架为我们提供的一种可以在代码中手动控制增强方法何时执行的方式
 */
 public Object aroundPringLog(ProceedingJoinPoint proceedingJoinPoint){

 Object returnValue = null;
 try {

  Object[] args = proceedingJoinPoint.getArgs(); //得到方法执行所需要的参数

  System.out.println("Logger类中的aroundPringLog方法开始记录日志了-----前置");

  returnValue = proceedingJoinPoint.proceed(args); //明确调用业务层方法,切入点方法

  System.out.println("Logger类中的aroundPringLog方法开始记录日志了-----后置");

  return returnValue;
 }catch (Throwable throwable){
  System.out.println("Logger类中的aroundPringLog方法开始记录日志了-----异常");
  throw new RuntimeException(throwable);
 }finally {
  System.out.println("Logger类中的aroundPringLog方法开始记录日志了-----最终");
 }
 }

}

9.6 运行结果

9.7 目录结构

到此这篇关于Spring中基于XML的AOP配置的文章就介绍到这了,更多相关Sprin AOP配置内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

  • java Collections 排序--多条件排序实例

    java Collections 排序--多条件排序实例

    这篇文章主要介绍了java Collections 排序--多条件排序实例,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
    2020-09-09
  • MyBatis与Spring整合过程实例解析

    MyBatis与Spring整合过程实例解析

    这篇文章主要介绍了MyBatis与Spring整合过程实例解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
    2020-02-02
  • java实现Xml与json之间的相互转换操作示例

    java实现Xml与json之间的相互转换操作示例

    这篇文章主要介绍了java实现Xml与json之间的相互转换操作,结合实例形式分析了Java xml与json相互转换工具类的定义与使用相关操作技巧,需要的朋友可以参考下
    2019-06-06
  • java中的正则操作方法总结

    java中的正则操作方法总结

    关于正则表达式的使用,更多的是自己的经验,有兴趣可以参阅相关书籍。这里主要写一下java中的正则操作方法
    2013-10-10
  • 使用@ControllerAdvice同时配置过滤多个包

    使用@ControllerAdvice同时配置过滤多个包

    这篇文章主要介绍了使用@ControllerAdvice同时配置过滤多个包的操作,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教
    2021-06-06
  • 详解Java内存泄露的示例代码

    详解Java内存泄露的示例代码

    这篇文章通过一个Demo来简要介绍下ThreadLocal和ClassLoader导致内存泄露最终OutOfMemory的场景。下面通过示例代码给大家分享Java内存泄露的相关知识,感兴趣的朋友一起看看吧
    2017-12-12
  • Spring Cache的基本使用与实现原理详解

    Spring Cache的基本使用与实现原理详解

    缓存是实际工作中非经常常使用的一种提高性能的方法, 我们会在很多场景下来使用缓存。下面这篇文章主要给大家介绍了关于Spring Cache的基本使用与实现原理的相关资料,文中通过示例代码介绍的非常详细,需要的朋友可以参考下
    2018-05-05
  • Java Map集合用法详解

    Java Map集合用法详解

    Map用于保存具有映射关系的数据,Map集合里保存着两组值,一组用于保存Map的ley,另一组保存着Map的value;Map集合和查字典类似,通过key找到对应的value,通过页数找到对应的信息。用学生类来说,key相当于学号,value对应name,age,sex等信息。用这种对应关系方便查找
    2021-10-10
  • SpringMVC RESTFul实战案例删除功能实现

    SpringMVC RESTFul实战案例删除功能实现

    这篇文章主要为大家介绍了SpringMVC RESTFul实战案例删除功能实现,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪
    2022-05-05
  • SpringMVC异常处理器编写及配置

    SpringMVC异常处理器编写及配置

    这篇文章主要介绍了SpringMVC异常处理器编写及配置,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
    2020-08-08

最新评论