我想要使用此扩展点,手动构建一个BeanDefinition。代码如下:
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry){
RootBeanDefinition userServiceBeanDefinition = new RootBeanDefinition();
userServiceBeanDefinition.setBeanClass(UserService.class);
// 这里的userName如何才能从属性配置文件中获取???
userServiceBeanDefinition .getPropertyValues().add("userName","${username}");
registry.registerBeanDefinition("userService", userServiceBeanDefinition);
}