方式1示例补充
* 该类必须放在一级目录下, 否则会报错
log
args
app
asel
appasel
appargs
log
方式2示例补充.
创建MyListener2类,并使用@Component注解将该类装载入spring容器中
MDC
DEFAULT_ORDER HIGHEST_PRECEDENCE
EVENT_TYPES
SOURCE_TYPES
env
event
appName env
appName
MDC appName
* (non-Javadoc)
*
* @see org.springframework.core.Ordered#getOrder()
DEFAULT_ORDER
* (non-Javadoc)
*
* @see org.springframework.context.event.GenericApplicationListener#
* supportsEventType(org.springframework.core.ResolvableType)
resolvableType
resolvableType EVENT_TYPES
sourceType
sourceType SOURCE_TYPES
type supportedTypes
type
supportedType supportedTypes
supportedTypetype
还没有评论,来说两句吧...