Hello,I am a newbie
There is a place that I don't understand
org.springframework.boot.SpringApplication#callRunners
There are in the method body new LinkedHashSet
Why create a new object?
Don't understand.
Help me answer and get out of the confusion, thanks.
Comment From: philwebb
Creating a new LinkedHashSet is used to ensure any duplicates in the ArrayList are removed. It's possible that a bean is both an ApplicationRunner and a CommandLineRunner, in which case we don't want to call it twice.
If you have any further questions, please ask them on gitter.im or stackoverflow.com. We prefer to keep GitHub issues for bugs and enhancement requests only.