exception work

This commit is contained in:
eugenp 2013-07-05 12:01:15 +03:00
parent 843c33616a
commit f380ca54f2
5 changed files with 34 additions and 1 deletions

View File

@ -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;
}

View File

@ -0,0 +1,8 @@
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
import org.springframework.stereotype.Component;
@Component
public class BeanB1 implements IBeanB {
//
}

View File

@ -0,0 +1,8 @@
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
import org.springframework.stereotype.Component;
@Component
public class BeanB2 implements IBeanB {
//
}

View File

@ -0,0 +1,5 @@
package org.baeldung.ex.nosuchbeandefinitionexception.cause2;
public interface IBeanB {
//
}

View File

@ -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() {