Search in sources :

Example 1 with BeanAge

use of cn.taketoday.context.annotation.BeanAge in project today-infrastructure by TAKETODAY.

the class FactoryMethodComponent method protectedInstance.

@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;
}
Also used : TestBean(cn.taketoday.beans.testfixture.beans.TestBean) BeanAge(cn.taketoday.context.annotation.BeanAge) Bean(cn.taketoday.context.annotation.Bean) TestBean(cn.taketoday.beans.testfixture.beans.TestBean)

Example 2 with BeanAge

use of cn.taketoday.context.annotation.BeanAge in project today-framework by TAKETODAY.

the class FactoryMethodComponent method protectedInstance.

@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;
}
Also used : TestBean(cn.taketoday.beans.testfixture.beans.TestBean) BeanAge(cn.taketoday.context.annotation.BeanAge) Bean(cn.taketoday.context.annotation.Bean) TestBean(cn.taketoday.beans.testfixture.beans.TestBean)

Aggregations

TestBean (cn.taketoday.beans.testfixture.beans.TestBean)2 Bean (cn.taketoday.context.annotation.Bean)2 BeanAge (cn.taketoday.context.annotation.BeanAge)2