2V0-72.22PSE Exam Questions
100 real 2V0-72.22PSE exam questions with expert-verified answers and explanations. Page 1 of 2.
- Question #1Core Spring
Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)
@SpringBootApplicationauto-configurationcomponent-scanningSpring Boot - Question #2Core Spring
Refer to the exhibit. It is a Java code fragment from a Spring application. Which statement is true with regard to the above example? (Choose the best answer.)
ApplicationContextgetBean() methodType-safe bean lookupSpring bean lifecycle - Question #3Core Spring
Which two statements about pointcut expressions are true? (Choose two.)
AOPpointcut expressionsjoin pointsannotations - Question #4Data Access
Which three types of objects can be returned form a JdbcTemplate query? (Choose three.)
JdbcTemplateQuery ResultsData AccessSpring JDBC - Question #5Security
Which two use cases can be addressed by the method level security annotation @PreAuthorize? (Choose two.)
@PreAuthorizemethod-level securitySpring Securityrole-based authorization - Question #6Core Spring
Which statement is true about the @PropertySource annotation? (Choose the best answer.)
@PropertySourceSpring Environmentexternal propertiesconfiguration - Question #7Data Access
Which two options are valid optional attributes for Spring's @Transactional annotation? (Choose two.)
@Transactionalisolationpropagationtransaction attributes - Question #8Data Access
Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)
Spring Data JPAEntity ScanningAuto-configurationEmbedded Databases - Question #9Core Spring
Refer to the exhibit. Based on the default Spring behavior, choose the correct answer. (Choose the best answer.)
Bean ScopesSingleton ScopeBean InstantiationSpring Configuration - Question #10Cloud Native
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 t...
auto-configuration@ConditionalOnMissingBean@ConditionalOnClassspring.factories - Question #11Core Spring
Refer to the exhibit. What is the id/name of the declared bean in this Java configuration class? (Choose the best answer.)
Bean naming conventions@Bean annotationSpring configurationMethod names - Question #12Testing
Which two statements are true regarding @DataJpaTest? (Choose two.)
@DataJpaTestTestEntityManagerJPA testingembedded database - Question #13Security
Which two statements are true regarding storing user details in Spring Security? (Choose two.)
UserDetailsServicepassword storageLDAPin-memory authentication - Question #14Cloud Native
Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)
auto-configuration@Conditionalspring.factoriesconditional beans - Question #15REST
Refer to the exhibit. How can a response status code be set for No Content (204)? (Choose the best answer.)
HTTP Status Codes@ResponseStatusREST handlersSpring annotations - Question #16Core Spring
Which statement describes the @AfterReturning advice type? (Choose the best answer.)
AOP Advice Types@AfterReturningException HandlingMethod Interception - Question #17Data Access
Refer to the exhibit. Which statement is true? (Choose the best answer.)
Spring DataRepositoriesAuto-proxyingJPA - Question #18Core Spring
Which two statements are correct regarding the Actuator info endpoint? (Choose two.)
Spring Boot Actuatorinfo endpointapplication metadataobservability - Question #19Testing
Which statement about @TestPropertySource annotation is true? (Choose the best answer.)
@TestPropertySourceTest ConfigurationProperty PrecedenceSpring Testing - Question #20Core Spring
Which two statements are correct regarding the Health Indicator status? (Choose two.)
Health IndicatorsStatus ValuesSpring Boot ActuatorCustom Health - Question #21Core Spring
What two options are auto-configured Spring Boot Actuator HealthIndicators? (Choose two.)
Spring Boot ActuatorHealthIndicatorsAuto-configurationMonitoring - Question #22Testing
Which two annotations indicate that the transaction for a transactional test method should be committed after the test method has completed? (Choose two.)
Spring TestingTransaction ManagementTest Annotations@Rollback/@Commit - Question #23Cloud Native
Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)
Actuator MetricsTimerMeter PrimitivesMicrometer - Question #24Testing
Which two statements are true regarding Spring Boot Testing? (Choose two.)
Spring Boot Testing@SpringBootTest annotationIntegration TestingApplicationContext - Question #25Core Spring
Which two statements are true regarding bean creation? (Choose two.)
Bean creation@Component@Bean annotationComponent scanning - Question #26Core Spring
What are the two reasons Spring be used to build a Java application? (Choose two.)
Dependency InjectionIoC ContainerSpring fundamentalsInfrastructure abstraction - Question #27Data Access
Which two statements describe Spring JdbcTemplate? (Choose two.)
JdbcTemplateQuery ExecutionResult Set HandlingException Translation - Question #28Core Spring
Which statement defines a pointcut? (Choose the best answer.)
AOPPointcutJoin PointSpring AOP - Question #29Core Spring
Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation? (Choose the best answer.)
Transaction PropagationREQUIRES_NEWSpring TransactionsThread Suspension - Question #30Core Spring
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.)
@Component@ComponentScanbean detectioncomponent scanning - Question #31Core Spring
Which two statements are true regarding a Spring Boot-based Spring MVC application? (Choose two.)
Embedded Servlet ContainerSpring Boot Auto-ConfigurationContainer AlternativesDefault Configuration - Question #32Core Spring
Why is field-based dependency injection not recommended?
Dependency InjectionConstructor InjectionSpring BeansImmutability - Question #33Data Access
When does the JdbcTemplate class acquire a database connection?
JdbcTemplateconnection poolinglazy loadingSpring JDBC - Question #34Security
In which three ways are Security filters used in Spring Security? (Choose three.)
Spring Securitysecurity filtersauthenticationauthorization - Question #35Cloud Native
Refer to the exhibit. The above code shows a conditional @Bean method for the creation of a JdbcTemplate bean. Which two statements correctly describe the code behavior? (Choose tw...
@ConditionalOnBeanJdbcTemplateDataSourceauto-configuration - Question #36Core Spring
What is a Spring Boot starter dependency? (Choose the best answer.)
Spring BootStartersDependenciesMaven - Question #37Core Spring
Which two are required to use transactions in Spring? (Choose two.)
Transaction ManagementSpring Configuration@EnableTransactionManagement@Transactional - Question #38REST
Which two statements are true regarding the RestTemplate class? (Choose two.)
RestTemplateREST clientsHTTP requestsmessage converters - Question #39Testing
Which statement is true? (Choose the best answer.)
@ActiveProfilesSpring ProfilesBean ConfigurationTest Annotations - Question #40REST
Which two statements are true about REST? (Choose two.)
REST principlesHTTP reliabilityStateless designInteroperability - Question #41Core Spring
Spring Boot will find and load property files in which of the following? (Choose the best answer.)
Spring Boot ConfigurationProperty FilesApplication BootstrapClasspath Resources - Question #42Testing
Which three dependencies are provided by the spring-boot-starter-test? (Choose three.)
Spring Boot TestingTest DependenciesJUnitHamcrest - Question #43Cloud Native
Which two statements are correct regarding Spring Boot auto-configuration customization? (Choose two.)
@AutoConfigureAfter@AutoConfigureBeforeexclude auto-configuration@AutoConfigureOrder - Question #44Core Spring
Which two options will inject the value of the daily.limit system property? (Choose two.)
@Value annotationProperty placeholdersSpEL syntaxSystem properties - Question #45REST
Which two options are REST principles? (Choose two.)
Stateless ArchitectureHTTP ProtocolREST PrinciplesAPI Design - Question #46Testing
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)
Web Slice Testing@MockBeanSpring BeansMocking - Question #47Security
Which two statements are true regarding Spring Security? (Choose two.)
method-level securityaccess controlauthentication mechanismspermitAll - Question #48Core Spring
Which dependency enables an automatic restart of the application as code is changed during development of a Spring boot configuration on a web application? (Choose the best answer....
Spring Boot DevToolsAutomatic RestartDevelopment ConfigurationHot Reload - Question #49Core Spring
Spring puts each bean instance in a scope. What is the default scope? (Choose the best answer.)
bean-scopessingletonSpring-defaultscontainer-management - Question #50REST
Refer to the exhibit. Which option is a valid way to retrieve the account id? (Choose the best answer.)
@PathVariablePath ParametersREST API RoutingRequest Mapping