Commit 863f248b authored by Alexander Kosarev's avatar Alexander Kosarev 🇦🇺

Added comments to clarify NoteRestController bean registration

parent 7d945d0d
......@@ -38,12 +38,13 @@ public class NoteBeansContextInitializer implements ApplicationContextInitialize
() -> new DefaultNoteService(applicationContext.getBean(NoteCrudRepository.class)));
applicationContext.registerBean(
// Bean name
"noteRestController",
// Bean type
NoteRestController.class,
// Bean supplier
() -> new NoteRestController(applicationContext.getBean(NoteService.class)),
// Bean definition customizer
// Bean definition customizers
beanDefinition -> beanDefinition.setAutowireCandidate(false),
beanDefinition -> beanDefinition.setDependsOn("noteService"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment