类org.springframework.context.annotation.spr10546.scanpackage.AEnclosingConfig源码实例Demo

下面列出了怎么用org.springframework.context.annotation.spr10546.scanpackage.AEnclosingConfig的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: spring-analysis-note   文件: Spr10546Tests.java
@Test
public void enclosingConfigFirstParentDefinesBean() {
	assertLoadsMyBean(AEnclosingConfig.class,AEnclosingConfig.ChildConfig.class);
}
 
源代码2 项目: spring-analysis-note   文件: Spr10546Tests.java
@Test
public void childConfigFirst() {
	assertLoadsMyBean(AEnclosingConfig.ChildConfig.class, AEnclosingConfig.class);
}
 
源代码3 项目: spring-analysis-note   文件: Spr10546Tests.java
@Test
public void enclosingConfigOnly() {
	assertLoadsMyBean(AEnclosingConfig.class);
}
 
源代码4 项目: spring-analysis-note   文件: Spr10546Tests.java
@Test
public void childConfigOnly() {
	assertLoadsMyBean(AEnclosingConfig.ChildConfig.class);
}
 
源代码5 项目: java-technology-stack   文件: Spr10546Tests.java
@Test
public void enclosingConfigFirstParentDefinesBean() {
	assertLoadsMyBean(AEnclosingConfig.class,AEnclosingConfig.ChildConfig.class);
}
 
源代码6 项目: java-technology-stack   文件: Spr10546Tests.java
@Test
public void childConfigFirst() {
	assertLoadsMyBean(AEnclosingConfig.ChildConfig.class, AEnclosingConfig.class);
}
 
源代码7 项目: java-technology-stack   文件: Spr10546Tests.java
@Test
public void enclosingConfigOnly() {
	assertLoadsMyBean(AEnclosingConfig.class);
}
 
源代码8 项目: java-technology-stack   文件: Spr10546Tests.java
@Test
public void childConfigOnly() {
	assertLoadsMyBean(AEnclosingConfig.ChildConfig.class);
}
 
源代码9 项目: spring4-understanding   文件: Spr10546Tests.java
@Test
public void enclosingConfigFirstParentDefinesBean() {
	assertLoadsMyBean(AEnclosingConfig.class,AEnclosingConfig.ChildConfig.class);
}
 
源代码10 项目: spring4-understanding   文件: Spr10546Tests.java
@Test
public void childConfigFirst() {
	assertLoadsMyBean(AEnclosingConfig.ChildConfig.class, AEnclosingConfig.class);
}
 
源代码11 项目: spring4-understanding   文件: Spr10546Tests.java
@Test
public void enclosingConfigOnly() {
	assertLoadsMyBean(AEnclosingConfig.class);
}
 
源代码12 项目: spring4-understanding   文件: Spr10546Tests.java
@Test
public void childConfigOnly() {
	assertLoadsMyBean(AEnclosingConfig.ChildConfig.class);
}
 
源代码13 项目: spring-analysis-note   文件: Spr10546Tests.java
/**
 * Prior to fixing SPR-10546 this might have succeeded depending on the ordering the
 * classes were picked up. If they are picked up in the same order as
 * {@link #enclosingConfigFirstParentDefinesBean()} then it would fail. This test is
 * mostly for illustration purposes, but doesn't hurt to continue using it.
 *
 * <p>We purposely use the {@link AEnclosingConfig} to make it alphabetically prior to the
 * {@link AEnclosingConfig.ChildConfig} which encourages this to occur with the
 * classpath scanning implementation being used by the author of this test.
 */
@Test
public void enclosingConfigFirstParentDefinesBeanWithScanning() {
	AnnotationConfigApplicationContext ctx= new AnnotationConfigApplicationContext();
	context = ctx;
	ctx.scan(AEnclosingConfig.class.getPackage().getName());
	ctx.refresh();
	assertThat(context.getBean("myBean",String.class), equalTo("myBean"));
}
 
源代码14 项目: java-technology-stack   文件: Spr10546Tests.java
/**
 * Prior to fixing SPR-10546 this might have succeeded depending on the ordering the
 * classes were picked up. If they are picked up in the same order as
 * {@link #enclosingConfigFirstParentDefinesBean()} then it would fail. This test is
 * mostly for illustration purposes, but doesn't hurt to continue using it.
 *
 * <p>We purposely use the {@link AEnclosingConfig} to make it alphabetically prior to the
 * {@link AEnclosingConfig.ChildConfig} which encourages this to occur with the
 * classpath scanning implementation being used by the author of this test.
 */
@Test
public void enclosingConfigFirstParentDefinesBeanWithScanning() {
	AnnotationConfigApplicationContext ctx= new AnnotationConfigApplicationContext();
	context = ctx;
	ctx.scan(AEnclosingConfig.class.getPackage().getName());
	ctx.refresh();
	assertThat(context.getBean("myBean",String.class), equalTo("myBean"));
}
 
源代码15 项目: spring4-understanding   文件: Spr10546Tests.java
/**
 * Prior to fixing SPR-10546 this might have succeeded depending on the ordering the
 * classes were picked up. If they are picked up in the same order as
 * {@link #enclosingConfigFirstParentDefinesBean()} then it would fail. This test is
 * mostly for illustration purposes, but doesn't hurt to continue using it.
 *
 * <p>We purposely use the {@link AEnclosingConfig} to make it alphabetically prior to the
 * {@link AEnclosingConfig.ChildConfig} which encourages this to occur with the
 * classpath scanning implementation being used by the author of this test.
 */
@Test
public void enclosingConfigFirstParentDefinesBeanWithScanning() {
	AnnotationConfigApplicationContext ctx= new AnnotationConfigApplicationContext();
	context = ctx;
	ctx.scan(AEnclosingConfig.class.getPackage().getName());
	ctx.refresh();
	assertThat(context.getBean("myBean",String.class), equalTo("myBean"));
}
 
 同包方法