Skip to content

Instantly share code, notes, and snippets.

@samhendley
samhendley / ApplicationContextDumper.java
Last active August 29, 2015 14:05 — forked from aleung/ApplicationContextDumper.java
Slightly improved version that ignores beans that can be considered "root" objects (prototypes, SmartLifecycle,BeanFactoryPostProcessor,ApplicationContextAware)
package leoliang.springtest;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.SmartLifecycle;
import org.springframework.context.support.AbstractRefreshableApplicationContext;
#! /bin/sh
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $syslog
# Required-Stop: $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db