spring exceptions now have their own project - these no longer belong

This commit is contained in:
eugenp 2013-07-14 14:49:01 +03:00
parent 76351a44ea
commit fd6fb97343
13 changed files with 0 additions and 174 deletions

View File

@ -1,12 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception.cause1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class BeanA {
@Autowired
private BeanB dependency;
}

View File

@ -1,5 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception.cause1;
public class BeanB {
//
}

View File

@ -1,12 +0,0 @@
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

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

View File

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

View File

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

View File

@ -1,19 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception.cause3;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
@Component
public class BeanA implements InitializingBean {
@Autowired
private ApplicationContext context;
@Override
public void afterPropertiesSet() {
context.getBean("someBeanName");
}
}

View File

@ -1,16 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan("org.baeldung.ex.nosuchbeandefinitionexception.cause1")
public class Cause1ContextWithJavaConfig {
public Cause1ContextWithJavaConfig() {
super();
}
// beans
}

View File

@ -1,16 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan("org.baeldung.ex.nosuchbeandefinitionexception.cause2")
public class Cause2ContextWithJavaConfig {
public Cause2ContextWithJavaConfig() {
super();
}
// beans
}

View File

@ -1,16 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception.spring;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan("org.baeldung.ex.nosuchbeandefinitionexception.cause3")
public class Cause3ContextWithJavaConfig {
public Cause3ContextWithJavaConfig() {
super();
}
// beans
}

View File

@ -1,19 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception;
import org.baeldung.ex.nosuchbeandefinitionexception.spring.Cause1ContextWithJavaConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { Cause1ContextWithJavaConfig.class }, loader = AnnotationConfigContextLoader.class)
public class Cause1NoSuchBeanDefinitionExceptionIntegrationTest {
@Test
public final void givenContextIsInitialized_thenNoException() {
//
}
}

View File

@ -1,19 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception;
import org.baeldung.ex.nosuchbeandefinitionexception.spring.Cause2ContextWithJavaConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { Cause2ContextWithJavaConfig.class }, loader = AnnotationConfigContextLoader.class)
public class Cause2NoSuchBeanDefinitionExceptionIntegrationTest {
@Test
public final void givenContextIsInitialized_thenNoException() {
//
}
}

View File

@ -1,19 +0,0 @@
package org.baeldung.ex.nosuchbeandefinitionexception;
import org.baeldung.ex.nosuchbeandefinitionexception.spring.Cause3ContextWithJavaConfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { Cause3ContextWithJavaConfig.class }, loader = AnnotationConfigContextLoader.class)
public class Cause3NoSuchBeanDefinitionExceptionIntegrationTest {
@Test
public final void givenContextIsInitialized_thenNoException() {
//
}
}