摘要:
通过Spring自定义event首先我们定义我们的event类package com.hyenas.spring.custom.event;import org.springframework.context.ApplicationEvent;public class CustomEvent extends ApplicationEvent{ private static final long serialVersionUID = -82737763905791865L; public CustomEvent(Object source) { super(so... 阅读全文
摘要:
Spring内置的event有1.ContextRefreshedEventThis event is published when theApplicationContextis either initialized or refreshed. This can also be raised using the refresh() method on theConfigurableApplicationContextinterface.2.ContextStartedEventThis event is published when theApplicationContextis start 阅读全文