Code example for AutowiredAnnotationBeanPostProcessor

0
 * Enhances the default behavior from Spring, adding support to injection 
 * through not annotated constructor, if there is only one. 
 * 
 * @author Fabio Kung 
 */ 
class InjectionBeanPostProcessor extends AutowiredAnnotationBeanPostProcessor {
 
 
	//  in case we are required to change the injection annotation: 
	//  public InjectionBeanPostProcessor() { 
	//	  this.setAutowiredAnnotationType(In.class); 
	//  } 
 
	@Override 
	@SuppressWarnings({ "unchecked", "rawtypes" }) 
	public Constructor[] determineCandidateConstructors(Class beanClass, String beanName) throws BeansException {
	Constructor[] candidates = super.determineCandidateConstructors(beanClass, beanName);
	if (candidates == null) {
		Constructor constructor = checkIfThereIsOnlyOneNonDefaultConstructor(beanClass);
		if (constructor != null) {
Connect your IDE to all the code out there  Get Codota for Java