Review 90 2V0-72-22 practice questions with answer explanations and community insights.
Question 1
If a class is annotated with @Component, what should be done to have Spring automatically detect the annotated class and load it as a bean? (Choose the best answer.)
Ensure a valid bean name in the @Component annotation is specified.
Ensure a valid @ComponentScan annotation in the Java configuration is specified.
Ensure a valid @Scope for the class is specified.
Ensure a valid @Bean for the class is specified.
Question 2
Which two options will inject the value of the daily.limit system property? (Choose two.)
@Value(“#{daily.limit}”)
@Value(“$(systemProperties.daily.limit)”)
@Value(“$(daily.limit)”)
@Value(“#{systemProperties[‘daily.limit’]}”)
@Value(“#{systemProperties.daily.limit}”)
Question 3
Which two options are REST principles? (Choose two.)
RESTful applications use a stateless architecture.
RESTful application use HTTP headers and status codes as a contract with the clients.
RESTful applications cannot use caching.
RESTful application servers keep track of the client state.
RESTful applications favor tight coupling between the clients and the servers.
Question 4
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)
Mocking a Spring Bean requires annotating it with @MockBean annotation.
If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.
Mocks cannot be used in a Spring Boot web slice test.
Mocking a Spring Bean requires annotating it with @Mock annotation.
Question 5
Which two statements are true regarding Spring Security? (Choose two.)
Access control can be configured at the method level.
A special Java Authentication and Authorization Service (JAAS) policy file needs to be configured.
Authentication data can be accessed using a variety of different mechanisms, including databases and LDAP.
In the authorization configuration, the usage of permitAll () allows bypassing Spring security completely.
It provides a strict implementation of the Java EE Security specification.