熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> Java編程 >> Java開源技術 >> 正文

Spring中事件處理的小技巧[2]

2022-06-13   來源: Java開源技術 

  java 代碼

  import orgspringframeworkcontextApplicationEvent;
  /**
  * 定義事件信息
  * @author new
  *
  */
  public class MessageEvent extends ApplicationEvent {
   private String message;
   public void setMessage(String message){
    thismessage = message;
   }
   public String getMessage(){
    return message;
   }
   public MessageEvent(Object source String message) {
    super(source);
    thismessage = message;
    // TODO Autogenerated constructor stub
   }
   private static final long serialVersionUID = L;
  }

[]  []  []  []  


From:http://tw.wingwit.com/Article/program/Java/ky/201311/29120.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.