In the example above, which statement is NOT true with regards to Spring Java configuration?

Posted by: Pdfprep Category: CoreSpringV3.2 Tags: , ,

In the example above, which statement is NOT true with regards to Spring Java configuration?

(select one)

@Configuration

public class AppConfig {

@Bean

public ClientService clientService() {

ClientServiceImpl clientService = new ClientServiceImpl();

clientService.addClientDao(new ClientDao());

return clientService;

}
A . The declared bean is a singleton by default
B . This bean might be wrapped by a proxy
C . This bean cannot use a method starting with "add" to inject a dependency
D . The bean is of type ClientService

Answer: C

Leave a Reply

Your email address will not be published.