类org.springframework.context.annotation.BeanAge源码实例Demo

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

@Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) {
	TestBean tb = new TestBean("protectedInstance", 1);
	tb.setSpouse(tb);
	tb.setCountry(country);
	return tb;
}
 
@Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) {
	TestBean tb = new TestBean("protectedInstance", 1);
	tb.setSpouse(tb);
	tb.setCountry(country);
	return tb;
}
 
@Bean @BeanAge(1)
protected TestBean protectedInstance(@Qualifier("public") TestBean spouse, @Value("#{privateInstance.age}") String country) {
	TestBean tb = new TestBean("protectedInstance", 1);
	tb.setSpouse(tb);
	tb.setCountry(country);
	return tb;
}
 
 类方法
 同包方法