[Q39-Q60] 実際にある2V0-72.22問題集でリアルVMware問題集PDFを提供しています [2025年04月]

Share

実際にある2V0-72.22問題集でリアルVMware問題集PDFを提供しています [2025年04月]

実際のJPNTest 2V0-72.22問題集PDFで100%合格率を保証します

質問 # 39
Refer to the exhibit.

Which two methods will be implemented at runtime if declared in a Spring Data JPA Repository? (Choose two.)

  • A. public Customer findFirstOrderDateMax();
  • B. public Customer findByEmail(String email);
  • C. public Customer getsingle(Long id);
  • D. public Customer findFirstByOrderDateBetween(Date d1, Date d2);
  • E. public Customer findCustomerByName(String name);

正解:B、D


質問 # 40
What is a Spring Boot starter dependency? (Choose the best answer.)

  • A. A setting for specifying which code you want Spring Boot to generate for you.
  • B. A specific POM which you must build to control Spring Boot's opinionated runtime.
  • C. A pre-existing model project you can download and use as the basis of your project.
  • D. An easy way to include multiple, coordinated dependencies related to a specific technology, like web or JDBC.

正解:D


質問 # 41
Which two statements about the @Autowired annotation are true? (Choose two.)

  • A. @Autowired fields are injected after any config methods are invoked.
  • B. By default, if a dependency cannot be satisfied with @Autowired, Spring throws a RuntimeException.
  • C. @Autowired can be used to inject references into BeanPostProcessor and
  • D. If @Autowired is used on a class, field injection is automatically performed for all dependencies.
  • E. Multiple arguments can be injected into a single method using @Autowired.

正解:C、E

解説:
BeanFactoryPostProcessor.


質問 # 42
Which two statements are true about Spring Boot and Spring Data JPA? (Choose two.)

  • A. Scanning of JPA Entities can not be customized, the whole classpath is scanned.
  • 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. @EntityScan and spring.jpa.* properties can be used to customize Spring Data JPA.
  • E. Embedded Databases (H2, HSQLDB, Derby) are not re-created during the startup.

正解:C、E


質問 # 43
Which two statements are true regarding the RestTemplate class? (Choose two.)

  • A. It provides convenience methods for writing REST clients.
  • B. It automatically supports sending and receiving Java objects.
  • C. It provides convenience methods for writing REST services.
  • D. It supports asynchronous non-blocking model.
  • E. Sending an HTTP request with a custom header is not possible when using RestTemplate.

正解:A、B

解説:
The RestTemplate class is a Spring class that provides an easy way to communicate with RESTful web services from within an application. It offers several convenience methods for performing HTTP requests and handling HTTP responses, such as getForObject(), postForEntity(), exchange(), etc. It also supports automatic conversion of Java objects to and from JSON or XML using HttpMessageConverter instances.


質問 # 44
Which two are required to use transactions in Spring? (Choose two.)

  • A. A class must be annotated with @Service and @Transaction.
  • B. Write a Spring AOP advice to implement transactional behavior.
  • C. Add @EnableTransactionManagement to a Java configuration class.
  • D. Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional annotation.
  • E. A class requiring a transaction must implement the TransactionInterceptor interface.

正解:C、D

解説:
Transactions are units of work that ensure data consistency and integrity by enforcing atomicity, consistency, isolation, and durability (ACID) properties. Spring provides an abstraction layer for transaction management that supports various transaction APIs such as JDBC, JPA, Hibernate, etc. To use transactions in Spring, we need to do two things:
Enable transaction management by adding @EnableTransactionManagement annotation to a Java configuration class or tx:annotation-driven/ element to an XML configuration file.
Declare transactional boundaries by annotating a class, an interface, or individual methods with the @Transactional annotation. This annotation indicates that the execution of the annotated element should be wrapped in a transaction.


質問 # 45
Which two statements are true regarding the RestTemplate class? (Choose two.)

  • A. Sending an HTTP request with a custom header is not possible when using RestTemplate.
  • B. It automatically supports sending and receiving Java objects.
  • C. It provides convenience methods for writing REST services.
  • D. It supports asynchronous non-blocking model.
  • E. It provides convenience methods for writing REST clients.

正解:A、B


質問 # 46
Refer to the exhibit.

Which option is a valid way to retrieve the account id? (Choose the best answer.)

  • A. Add @RequestParam long accountId argument to the update() handler method.
  • B. Add @RequestParam("id") String accountId argument to the update() handler method.
  • C. Add @PathVariable("id") String accountId argument to the update() handler method.
  • D. Add @PathVariable long accountId argument to the update() handler method.

正解:C


質問 # 47
Given an ApplicationContext containing three bean definitions of type Foo with bean ids foo1, foo2, and foo3, which three @Autowired scenarios are valid and will allow the ApplicationContext to initialize successfully? (Choose three.)

  • A. @Autowired public void setFoo (@Qualifier ("foo1") Foo foo) {...}
  • B. @Autowired private Foo foo;
  • C. @Autowired @Qualifier ("foo3") Foo foo;
  • D. @Autowired public void setFoo (Foo foo) {...}
  • E. @Autowired public void setFoo(Foo foo2) {...}
  • F. @Autowired private Foo foo2;

正解:A、C、E

解説:
The @Autowired annotation can be used to inject a dependency into a field, a constructor, or a setter method. However, if there are multiple beans of the same type in the application context, Spring will not be able to determine which one to inject by default. To resolve this ambiguity, we can use the @Qualifier annotation to specify the bean id of the desired dependency. Alternatively, we can use the bean id as the name of the field or the parameter of the setter method, and Spring will match it with the corresponding bean.


質問 # 48
Which two statements are correct regarding Spring Boot auto-configuration? (Choose two.)

  • A. Auto-configuration could apply when a bean is missing but not when a bean is present.
  • B. Auto-configuration could apply when a bean is present but not when a bean is missing.
  • C. Auto-configuration is applied before user-defined beans have been registered.
  • D. Auto-configuration uses @Conditional annotations to constrain when it should apply.
  • E. Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.

正解:D、E


質問 # 49
Which following statements are true about Spring Data? (Choose two.)

  • A. Spring Data cannot be used together with Spring MVC.
  • B. Spring Data works by applying the JPA annotations to data stores such as MongoDB, Neo4j, and Redis.
  • C. Spring Data can greatly reduce the amount of "boilerplate" code typically needed for data access.
  • D. Spring Data is specifically designed for JPA, JDBC, and relational database access only.
  • E. Spring Data implementations exist for many data storage types, such as MongoDB, Neo4j, and Redis.

正解:C、E

解説:
Spring Data MongoDB https://spring.io/projects/spring-data-mongodb . Spring Data Neo4j https://spring.io/projects/spring-data-neo4j Spring Data Redis https://spring.io/projects/spring-data-redis For example: Spring Data Envers Optional<T> findById(ID primaryKey);


質問 # 50
Refer to the exhibit.

AppConfig is a Java configuration class. Which two statements are true? (Choose two.)

  • A. The bean is of type clientService and by default will be a Singleton.
  • B. The clientService bean declared will have prototype scope by default.
  • C. The clientService bean will be lazy initialized the first time accessed.
  • D. The Java configuration can be profile specific by adding a @Profile annotation.
  • E. The name of the clientService() method is invalid and will throw an error.

正解:A、D


質問 # 51
Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)

  • A. A separate ApplicationContext will be created for each class annotated with
  • B. All other annotations on the class will be ignored.
  • C. Component scanning will start from the package of the class.
  • D. It causes Spring Boot to enable auto-configuration by default.
  • E. Methods in the class annotated with @Bean will be ignored.

正解:C、D

解説:
@SpringBootApplication.
Explanation:
A . It causes Spring Boot to enable auto-configuration by default.
This is true because the @SpringBootApplication annotation includes the @EnableAutoConfiguration annotation, which enables Spring Boot's auto-configuration mechanism1. Auto-configuration attempts to automatically configure your Spring application based on the jar dependencies that you have added2.
B . Component scanning will start from the package of the class.
This is true because the @SpringBootApplication annotation includes the @ComponentScan annotation, which enables component scanning on the package where the application is located1. Component scanning allows Spring to automatically detect and register beans annotated with @Component, @Controller, @Service, @Repository, etc3.


質問 # 52
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 two.)

  • A. @ConditionalOnBean(name= "dataSource") should be replaced with
    @ConditionalOnMissingBean (DataSource.class) for greater flexibility.
  • B. A JdbcTemplate bean will be created when the DataSource class is in the classpath but there is no DataSource bean.
  • C. The @Bean annotation should be removed.
  • D. A JdbcTemplate bean will be created when a bean named dataSource has already been created.
  • E. @ConditionalOnBean(name= "dataSource") should be replaced with @ConditionalOnBean (DataSource.class) for greater flexibility.

正解:B、E


質問 # 53
Which two options are valid optional attributes for Spring's @Transactional annotation? (Choose two.)

  • A. isolation
  • B. writeOnly
  • C. propagation
  • D. readWrite
  • E. nestedTransaction

正解:A、C

解説:
https://www.baeldung.com/transaction-configuration-with-jpa-and-spring
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/transaction/annotation/Transactional.html


質問 # 54
Which two statements are correct regarding Spring Boot 2.x Actuator Metrics? (Choose two.)

  • A. A metric must be created with one or more tags.
  • B. The metrics endpoint /actuator/metrics is exposed over HTTP by default.
  • C. An external monitoring system must be used with Actuator.
  • D. Timer measures both the number of timed events and the total time of all events timed.
  • E. Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary.

正解:D、E

解説:
Custom metrics can be measured using Meter primitives such as Counter, Gauge, Timer, and DistributionSummary: Spring Boot Actuator Metrics allows you to define and measure custom metrics using various Meter primitives. These primitives include Counter (counting occurrences), Gauge (providing a current value), Timer (measuring the time taken for a task), and DistributionSummary (collecting and summarizing distribution statistics).


質問 # 55
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.)

  • A. It will return a bean called ClientService regardless of its id or name.
  • B. This syntax is invalid because the result of the getBean() method call should be cast to ClientService.
  • C. This syntax is invalid because the bean id must be specified as a method parameter.
  • D. It will return a bean of the type ClientService regardless of its id or name.

正解:D

解説:
https://www.baeldung.com/spring-getbean#3-retrieving-bean-by-type


質問 # 56
Which two use cases can be addressed by the method level security annotation @PreAuthorize? (Choose two.)

  • A. Allow access to a method based on the returned object.
  • B. Allow access to a method based on request URL.
  • C. Allow access to a method based on user identity.
  • D. Allow access to a method based on HTTP method.
  • E. Allow access to a method based on roles.

正解:C、E

解説:
A . Allow access to a method based on user identity.
This is true because the @PreAuthorize annotation can use the principal object to access the user identity and check if it matches a certain condition. For example, we can use the following expression to allow access only to the user with the username "admin":
@PreAuthorize("principal.username == 'admin'")
E . Allow access to a method based on roles.
This is true because the @PreAuthorize annotation can use the hasRole, hasAnyRole, or hasAuthority methods to check if the user has a certain role or authority. For example, we can use the following expression to allow access only to users who have the role "ADMIN" or "USER":
@PreAuthorize("hasAnyRole('ADMIN', 'USER')")


質問 # 57
Which two statements about BeanFactoryPostProcessors are true? (Choose two.)

  • A. Creates proxies for the Spring beans that require an extra behavior like transaction management.
  • B. Allows for the transformation of Spring bean definitions before the beans are instantiated.
  • C. Detects annotations such as @PostConstruct and @PreDestroy and then invokes appropriate behavior.
  • D. PropertySourcesPlaceholderConfigurer implements BeanFactoryPostProcessor and is used to read property values from the Spring Environment.
  • E. Allows for the transformation of Spring bean definitions after the beans have been instantiated.

正解:B、D

解説:
(1) BeanFactoryPostProcessor (Spring Framework 6.1.3 API). https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/config/BeanFactoryPostProcessor.html. (2) Spring BeanPostProcessor | Baeldung. https://www.baeldung.com/spring-beanpostprocessor. (3) BeanFactoryPostProcessor - Spring | Home. https://docs.spring.io/spring-framework/docs/3.0.x/javadoc-api/org/springframework/beans/factory/config/BeanFactoryPostProcessor.html. (4) BeanFactoryPostProcessor (Spring Framework API 2.5). https://docs.spring.io/spring-framework/docs/2.5.x/javadoc-api/org/springframework/beans/factory/config/BeanFactoryPostProcessor.html. (5) Spring BeanPostProcessor Example - HowToDoInJava. https://howtodoinjava.com/spring-core/spring-bean-post-processors/


質問 # 58
What two options are auto-configured Spring Boot Actuator HealthIndicators? (Choose two.)

  • A. DataSourceHealthIndicator
  • B. OktaHealthIndicator
  • C. GoogleCloudDataStoreHealthIndicator
  • D. DynamoDBHealthIndicator
  • E. RabbitHealthIndicator

正解:A、E


質問 # 59
In which three ways are Security filters used in Spring Security? (Choose three.)

  • A. To provide a logout capability.
  • B. To drive authentication.
  • C. To enforce authorization (access control).
  • D. To encrypt data.
  • E. To manage application users.
  • F. To provide risk governance.

正解:A、B、C

解説:
Spring Security uses a filter-based architecture to provide security services for web applications. A filter is an object that intercepts HTTP requests and responses and performs some logic before or after the request is processed by the servlet. Spring Security provides a number of filters for different purposes, such as:
Authentication: Filters that handle the authentication process, such as UsernamePasswordAuthenticationFilter, BasicAuthenticationFilter, RememberMeAuthenticationFilter, etc.
User management: Filters that manage the user details and roles, such as SecurityContextPersistenceFilter, AnonymousAuthenticationFilter, ConcurrentSessionFilter, etc.
Logout: Filters that handle the logout process, such as LogoutFilter and SecurityContextLogoutHandler.
Authorization: Filters that enforce access control rules based on the user's authentication and roles, such as FilterSecurityInterceptor, ExceptionTranslationFilter, etc.


質問 # 60
......

検証済み2V0-72.22問題集と解答で最新2V0-72.22をダウンロード:https://www.jpntest.com/shiken/2V0-72.22-mondaishu

無料VMware 2V0-72.22試験問題と解答があります:https://drive.google.com/open?id=1TVQvt2cFaXimVszTj0NxFdjRKc84rw9I

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡