# @configurable **Repository Path**: JustNickNameWSH/configurable ## Basic Information - **Project Name**: @configurable - **Description**: @Configurable的使用可以让在容器中的对象,new来创建 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-04-22 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @Configurable 让在spring容器中可以new 对象的同时调用容器中的属性,方法! 如: @Configurable public Person(){ @Autowired private Car car; public String saySomething(){ return car.toString(); } } @Component public class Car { private String name; ... 省略:getter and setter and toString } @SpringbootTest @RunWith(SpringRunner.class) public class Test { @Test public void t1(){ Person person = new Person(); person.saySomething(); } }