further exceptions work
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
package org.baeldung.ex.beancreationexception.cause6;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanA {
|
||||
private IBeanB dependency;
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package org.baeldung.ex.beancreationexception.cause6;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanB implements IBeanB {
|
||||
//
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package org.baeldung.ex.beancreationexception.cause6;
|
||||
|
||||
public interface IBeanB {
|
||||
//
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package org.baeldung.ex.beancreationexception.cause8;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanA implements IBeanA {
|
||||
private IBeanB beanB;
|
||||
|
||||
@Autowired
|
||||
public BeanA(final IBeanB beanB) {
|
||||
super();
|
||||
this.beanB = beanB;
|
||||
}
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.baeldung.ex.beancreationexception.cause8;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class BeanB implements IBeanB {
|
||||
final IBeanA beanA;
|
||||
|
||||
@Autowired
|
||||
public BeanB(final IBeanA beanA) {
|
||||
super();
|
||||
this.beanA = beanA;
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package org.baeldung.ex.beancreationexception.cause8;
|
||||
|
||||
public interface IBeanA {
|
||||
//
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package org.baeldung.ex.beancreationexception.cause8;
|
||||
|
||||
public interface IBeanB {
|
||||
//
|
||||
}
|
||||
+2
@@ -2,9 +2,11 @@ package org.baeldung.ex.beancreationexception.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("org.baeldung.ex.beancreationexception.cause6")
|
||||
@ImportResource("classpath:beancreationexception_cause6.xml")
|
||||
public class Cause6ContextWithJavaConfig {
|
||||
|
||||
public Cause6ContextWithJavaConfig() {
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package org.baeldung.ex.beancreationexception.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("org.baeldung.ex.beancreationexception.cause7")
|
||||
@ImportResource("classpath:beancreationexception_cause7.xml")
|
||||
public class Cause7ContextWithJavaConfig {
|
||||
|
||||
public Cause7ContextWithJavaConfig() {
|
||||
super();
|
||||
}
|
||||
|
||||
// beans
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package org.baeldung.ex.beancreationexception.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("org.baeldung.ex.beancreationexception.cause8")
|
||||
public class Cause8ContextWithJavaConfig {
|
||||
|
||||
public Cause8ContextWithJavaConfig() {
|
||||
super();
|
||||
}
|
||||
|
||||
// beans
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user