What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)
A.
clientServiceImpl (starting with lowercase “c”)
B.
clientServiceImpl (starting with uppercase “C”)
C.
clientService (starting with lowercase “c”)
D.
ClientService (starting with uppercase “C”)
Answer:
D
User Votes:
A 1 votes
50%
B
50%
C 1 votes
50%
D
50%
Discussions
0/ 1000
Question 11
Refer to the exhibit.
Which two statements are correct regarding the HelloAutoConfig auto-configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)
A.
A HelloService bean will be created from the helloService() method even if the HelloService.class is not in the classpath.
B.
A HelloService bean will be created from the helloService() method only when there is no other HelloService bean in the ApplicationContext.
C.
This auto-configuration class is used only when the HelloService.class is not on the classpath.
D.
This auto-configuration class is used only when the HelloService.class is on the classpath.
E.
A HelloService bean will be created from the helloService() method and will replace existing a HelloService bean in the ApplicationContext.
Answer:
BD
User Votes:
A 1 votes
50%
B
50%
C 1 votes
50%
D
50%
E
50%
Discussions
0/ 1000
Question 12
Refer to the exhibit.
Based on the default Spring behavior, choose the correct answer. (Choose the best answer.)
A.
One AccountRepository bean will be instantiated since the default scope is singleton.
B.
Three AccountRepository beans will be instantiated as the accountRepository() method will be called three times.
C.
Many AccountRepository beans will be instantiated, depending how often accountRepository(), transferService() and accountService() are called.
D.
Two AccountRepository beans will be instantiated as the accountRepository() method will be called two times.
Answer:
C
User Votes:
A 1 votes
50%
B
50%
C
50%
D
50%
Discussions
0/ 1000
Question 13
Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)
A.
@EntityScan and spring.jpa.* properties can be used to customize Spring Data JPA.
B.
Any kind of Hibernate property can be passed to Spring Data JPA like spring.jpa.properties.xxx.
C.
Spring Data JPA is the only implementation for relational databases.
D.
Scanning of JPA Entities can not be customized, the whole classpath is scanned.
E.
Embedded Databases (H2, HSQLDB, Derby) are not re-created during the startup.