Spring 中的自定义事件


当前第2页 返回上一页


<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

   <bean id="customEventHandler" 
      class="com.tutorialspoint.CustomEventHandler"/>

   <bean id="customEventPublisher" 
      class="com.tutorialspoint.CustomEventPublisher"/>

</beans>

一旦你完成了创建源和 bean 的配置文件后,我们就可以运行该应用程序。如果你的应用程序一切都正常,将输出以下信息:


My Custom Event
My Custom Event



标签:Spring IoC

返回前面的内容

相关阅读 >>

spring bean 生命周期

spring beanfactory 容器

spring applicationcontext 容器

spring bean 定义继承

spring 自动装配 bytype

spring 自动装配 byname

spring jsr-250 注释

spring mvc hello world 例子

spring bean 后置处理器

spring mvc 表单处理例子

更多相关阅读请进入《Spring IoC》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...