This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class MyConfiguration implements BeanFactoryPostProcessor { | |
//--- Usual @Bean functions go here --- | |
private static String[] params = {"param1", "param2", "param3", "param50"}; | |
@Override | |
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { | |
Arrays.asList(params).forEach(param -> createAndRegister((BeanDefinitionRegistry)beanFactory, param)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public MyClass myClassBean() { | |
return new MyClass("param1"); | |
} |
NewerOlder