I can get a bean definition with this line of code:
BeanDefinitionRegistry bdr = (BeanDefinitionRegistry) context.getAutowireCapableBeanFactory();
bdr.getBeanDefinition("myBean")
Generic bean: class [com.kciray.play.MyBean]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null
initMethodName is null when I use either @PostConstruct or InitializingBean.afterPropertiesSet. So, those aren't the exact alternatives to XML configuration (init-method="some").
I'd like to know the reason behind this tiny inconsistency. And the way to set init-method in Java, for learning sake.