exception work
This commit is contained in:
parent
843c33616a
commit
f380ca54f2
|
@ -0,0 +1,12 @@
|
||||||
|
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class BeanA {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBeanB dependency;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class BeanB1 implements IBeanB {
|
||||||
|
//
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class BeanB2 implements IBeanB {
|
||||||
|
//
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
|
||||||
|
|
||||||
|
public interface IBeanB {
|
||||||
|
//
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan("org.baeldung.di.cause2")
|
@ComponentScan("org.baeldung.di.cause3")
|
||||||
public class Cause3ContextWithJavaConfig {
|
public class Cause3ContextWithJavaConfig {
|
||||||
|
|
||||||
public Cause3ContextWithJavaConfig() {
|
public Cause3ContextWithJavaConfig() {
|
||||||
|
|
Loading…
Reference in New Issue