目录
Spring监听器
示例
package com.huifer.source.spring.applicationListener;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
public class DemoApplicationListener implements ApplicationListener {
@Override
public void onApplicationEvent(ApplicationEvent event) {
System.out.println("com.huifer.source.spring.applicationListener.DemoApplicationListener.onApplicationEvent");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://ww