event,listener是observer模式一种体现,在spring 3.0.5中,已经可以使用annotation实现event和eventListner里. 我们以spring-webflow里的hotel booking为例,看一下实现,步骤如下: 1,建立event public class BookingCreatedEvent extends ApplicationEvent { private static final long serialVersionUID = 3039
Spring Application Event 项目结构 工程下载 https://github.com/xiaoheike/SpringApplicationEventExample.git SportEvent package nd.esp.com.event; import org.springframework.context.ApplicationEvent; public class SportEvent extends ApplicationEvent { private sta
1.测试程序EventTest.java,发布一个事件只需要调用FrameEventHolder.publishEvent()方法即可. package com.junge.spring.event; import com.junge.spring.vo.Mail; public class EventTest { /** * @param args */ public static void main(String[] args) { FrameEvent frameEvent = new F
event,listener是observer模式一种体现,在spring 3.0.5中,已经可以使用annotation实现event和eventListner里. 我们以spring-webflow里的hotel booking为例,看一下实现,步骤如下: 1,建立event public class BookingCreatedEvent extends ApplicationEvent { private static final long serialVersionUID = 3039