com.herion.hello.LisiListener.java Source code

Java tutorial

Introduction

Here is the source code for com.herion.hello.LisiListener.java

Source

/**
 * Copyright (c) 2005-2012 https://github.com/zhangkaitao
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package com.herion.hello;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * <p>User: herion
 * <p>Date: 13-7-8 ?9:10
 * <p>Version: 1.0
 */
@Component
public class LisiListener implements ApplicationListener<ApplicationEvent> {

    @Override
    public void onApplicationEvent(final ApplicationEvent event) {
        if (event instanceof ContentEvent) {
            System.out.println("?" + event.getSource());
        }
    }
}