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

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

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments