bean work
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanA implements InitializingBean {
|
||||
public class BeanA {
|
||||
|
||||
// @Autowired
|
||||
// private IBeanC dependency;
|
||||
private IBeanC dependency;
|
||||
|
||||
public BeanA() {
|
||||
super();
|
||||
@@ -15,10 +13,4 @@ public class BeanA implements InitializingBean {
|
||||
|
||||
//
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
System.out.println();
|
||||
// throw new NullPointerException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package org.baeldung.web;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanC implements IBeanC {
|
||||
public class BeanB implements IBeanB {
|
||||
|
||||
public BeanC() {
|
||||
public BeanB() {
|
||||
super();
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package org.baeldung.web;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanB1 implements IBeanB {
|
||||
public class BeanC1 implements IBeanC {
|
||||
|
||||
public BeanB1() {
|
||||
public BeanC1() {
|
||||
super();
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,9 +3,9 @@ package org.baeldung.web;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanB2 implements IBeanB {
|
||||
public class BeanC2 implements IBeanB {
|
||||
|
||||
public BeanB2() {
|
||||
public BeanC2() {
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package org.baeldung.web;
|
||||
|
||||
public abstract class BeanD implements IBeanD {
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanD implements IBeanD {
|
||||
|
||||
public BeanD() {
|
||||
super();
|
||||
|
||||
Reference in New Issue
Block a user