Refer to the exhibit.
What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)
This is true because the id/name of a bean declared by the @Bean annotation is derived from the name of the method that returns the bean. In this case, the method name is clientService, so the bean name will be clientService as well. By default, Spring uses a lower-case first letter for bean names, unless explicitly specified otherwise by using the name attribute of the @Bean annotation. For example, we can use @Bean(name = ''ClientService'') to change the bean name to ClientService (starting with uppercase ''C'').
Currently there are no comments in this discussion, be the first to comment!