Skip to content

Commit

Permalink
Simplify SPR-8905 repro case
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeams committed Dec 9, 2011
1 parent 51d8871 commit 0d49d60
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 37 deletions.
13 changes: 1 addition & 12 deletions SPR-8905/src/main/java/test/AbstractService.java
Expand Up @@ -3,18 +3,7 @@
public abstract class AbstractService<D extends AbstractDao> {

protected D dao;

public abstract void setDao(D dao);

@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("AbstractService [dao=");
builder.append(dao);
builder.append("]");
return builder.toString();
}



}
10 changes: 0 additions & 10 deletions SPR-8905/src/main/resources/applicationContext.xml

This file was deleted.

25 changes: 10 additions & 15 deletions SPR-8905/src/test/java/test/ContextTest.java
@@ -1,24 +1,19 @@
package test;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:applicationContext.xml")
public class ContextTest {

@Autowired
FirstService firstService;

@Autowired
SecondService secondService;

@Test
public void testMe() {
System.out.println(firstService);
System.out.println(secondService);
public void repro() {
AnnotationConfigApplicationContext ctx =
new AnnotationConfigApplicationContext();
ctx.register(FirstDao.class);
ctx.register(SecondDao.class);
ctx.register(FirstService.class);
ctx.register(SecondService.class);
ctx.refresh();
}

}

0 comments on commit 0d49d60

Please sign in to comment.