究極のガイド準備2V0-72.22認証試験VCP-AM Develop 2022は2025年更新 [Q48-Q65]

Share

究極のガイド準備2V0-72.22認証試験VCP-AM Develop 2022は2025年更新

リアル2V0-72.22問題集でVMware正確なアンサーは最新問題は2025年更新


VMware 2V0-72.22 認定試験は、VMware Spring に関する候補者の知識とスキルをテストするために設計された 70 問の多肢選択問題から成り立っています。試験時間は 130 分で、合格スコアは 500 点中 300 点です。この試験は英語、日本語、簡体字中国語で利用可能です。

 

質問 # 48
Refer to the exhibit.

Which statement is true? (Choose the best answer.)

  • A. A class that implements CustomerRepository must be implemented and declared as a Spring Bean.
  • B. An implementation of this repository can be automatically generated by Spring Data JPA.
  • C. JPA annotations are required on the Customer class to successfully use Spring Data JDBC.
  • D. CustomerRepository should be a class, not an interface.

正解:B


質問 # 49
Which option is true about use of mocks in a Spring Boot web slice test? (Choose the best answer.)

  • A. Mocks cannot be used in a Spring Boot web slice test.
  • B. Mocking a Spring Bean requires annotating it with @Mock annotation.
  • C. If a Spring Bean already exists in the web slice test spring context, it cannot be mocked.
  • D. Mocking a Spring Bean requires annotating it with @MockBean annotation.

正解:D


質問 # 50
Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)

  • A. The spring-test dependency provides annotations such as @Mock and @MockBean.
  • B. Integration and slice testing are both supported.
  • C. Mockito spy is not supported in Spring Boot testing by default.
  • D. EasyMock is supported out of the box.
  • E. @SpringBootTest or @SpringJUnitConfig can be used for creating an ApplicationContext.

正解:B、E

解説:
Spring and Spring Boot provide various annotations and utilities to support testing of different layers of the application. To create an ApplicationContext for integration tests, we can use either @SpringBootTest or @SpringJUnitConfig annotations. The former is a specialized annotation that also provides additional features such as auto-configuration, web environment emulation, and test properties management. The latter is a general-purpose annotation that combines @ContextConfiguration and @ExtendWith(SpringExtension.class) annotations.
To perform slice testing, which focuses on testing a specific layer or feature of the application in isolation, we can use annotations such as @WebMvcTest, @DataJpaTest, @RestClientTest, etc. These annotations will only load the relevant beans for the tested slice and mock or stub the other dependencies.


質問 # 51
Which two statements are true regarding a Spring Boot "fat" JAR? (Choose two.)

  • A. The "fat" JAR requires an external Servlet container.
  • B. The "fat" JAR is created by the Spring Boot Maven plugin or Gradle plugin.
  • C. The "fat" JAR contains both the class files and the source files for your project.
  • D. The "fat" JAR contains compiled classes and dependencies that your code needs to run.
  • E. The "fat" JAR can contain multiple embedded application servers.

正解:B、D


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

  • A. Auto-configuration uses @Conditional annotations to constrain when it should apply.
  • 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 could apply when a bean is missing but not when a bean is present.
  • E. Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.

正解:B、C


質問 # 53
Refer to the exhibit.

How can a response status code be set for No Content (204)? (Choose the best answer.)

  • A. Annotate the update() handler method with @ResponseEntity(204).
  • B. Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
  • C. The update() handler method cannot return a void type, it must return a ResponseEntity type.
  • D. Annotate the update() handler method with @PutMapping("/store/orders/{id"}", HttpStatus.NO_CONTENT).

正解:A


質問 # 54
Spring Boot will find and load property files in which of the following? (Choose the best answer.)

  • A. A *.properties file matching the name of the class annotated with @SpringBootApplication.
  • B. env.properties or env.yml, usually located in the classpath root.
  • C. config.properties or config.yml, usually located in the classpath root.
  • D. application.properties or application.yml, usually located in the classpath root.

正解:D


質問 # 55
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. Multiple arguments can be injected into a single method using @Autowired.
  • E. If @Autowired is used on a class, field injection is automatically performed for all dependencies.

正解:C、D

解説:
BeanFactoryPostProcessor.


質問 # 56
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. This syntax is invalid because the result of the getBean() method call should be cast to ClientService.
  • B. This syntax is invalid because the bean id must be specified as a method parameter.
  • C. It will return a bean called ClientService regardless of its id or name.
  • D. It will return a bean of the type ClientService regardless of its id or name.

正解:D


質問 # 57
Which three statements are advantages of using Spring's Dependency Injection? (Choose three.)

  • A. Dependency injection facilitates loose coupling between components.
  • B. Configuration can be externalized and centralized in a small set of files.
  • C. Dependency injection can make code easier to trace because it couples behavior with construction.
  • D. Dependencies between application components can be managed external to the components.
  • E. Dependency injection reduces the start-up time of an application.
  • F. Dependency injection creates tight coupling between components.

正解:B、E、F


質問 # 58
Which statement is true about the @PropertySource annotation? (Choose the best answer.)

  • A. Used to designate the location of the application.properties file in a Spring Boot application.
  • B. Used to designate the file directory of the application.properties file in a Spring Boot application.
  • C. Used to easily look up and return a single property value from some external property file.
  • D. Used to add a set of name/value pairs to the Spring Environment from an external source.

正解:D

解説:
This is true because the @PropertySource annotation provides a convenient and declarative mechanism for adding a PropertySource to Spring's Environment. A PropertySource is an abstraction for a source of name/value pairs that can be used by the Environment to resolve properties. The @PropertySource annotation can be used to load properties from an external file, such as a .properties or .yml file, and make them available to the application context.
https://docs.spring.io/spring-framework/reference/core/beans/environment.html#beans-using-propertysource


質問 # 59
Which two statements are true regarding @WebMvcTest? (Choose two.)

  • A. It is used for testing Spring MVC components such as @Controller with a running server.
  • B. It auto-configures a MockMvc.
  • C. Typically it is used in combination with @MockBean when there is a dependency bean to be mocked.
  • D. It is typically used with @ExtendWith(MockitoExtension.class) in JUnit 5.
  • E. It will only scan for @Controller beans in the source code.

正解:B、C


質問 # 60
Which three types of objects can be returned form a JdbcTemplate query? (Choose three.)

  • A. Properties
  • B. Simple types (int, long, String, etc)
  • C. JSONObject
  • D. User defined types
  • E. Generic MapS
  • F. XMLObject

正解:B、D、E

解説:
The JdbcTemplate class provides various methods to execute queries and manipulate the query results. Depending on the query and the expected result type, we can choose from the following three types of objects that can be returned from a JdbcTemplate query:
A . Generic Maps
This is true because the JdbcTemplate.queryForList method returns a List of Map objects, where each Map represents a row of the query result. The Map keys are the column names and the Map values are the column values1. For example:
List<Map<String, Object>> results = jdbcTemplate.queryForList("SELECT * FROM EMPLOYEE"); for (Map<String, Object> row : results) { System.out.println(row.get("NAME") + " " + row.get("SALARY")); } B . Simple types (int, long, String, etc) This is true because the JdbcTemplate.queryForObject method can return a single value of a simple type, such as int, long, String, etc. This method is useful for running queries that return a single row and a single column2. For example:
int count = jdbcTemplate.queryForObject("SELECT COUNT(*) FROM EMPLOYEE", Integer.class); System.out.println("Number of employees: " + count); D . User defined types This is true because the JdbcTemplate.query method can return a List of user defined types, such as custom classes or beans. This method takes a RowMapper as an argument, which is an interface that maps each row of the query result to an instance of the user defined type3. For example:
public class Employee { private String name; private int salary; // getters and setters } public class EmployeeRowMapper implements RowMapper<Employee> { @Override public Employee mapRow(ResultSet rs, int rowNum) throws SQLException { Employee employee = new Employee(); employee.setName(rs.getString("NAME")); employee.setSalary(rs.getInt("SALARY")); return employee; } } List<Employee> employees = jdbcTemplate.query("SELECT * FROM EMPLOYEE", new EmployeeRowMapper()); for (Employee employee : employees) { System.out.println(employee.getName() + " " + employee.getSalary()); }


質問 # 61
Which two statements are correct regarding the Health Indicator status? (Choose two.)

  • A. The status with the least severity is used as the top-level status.
  • B. The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.
  • C. Custom status values can be created.
  • D. The severity order cannot be changed due to security reasons.
  • E. The last status in a sorted list of HealthIndicators is used to derive the final system health.

正解:B、C


質問 # 62
Which statement describes the @AfterReturning advice type? (Choose the best answer.)

  • A. The advice is invoked only if the method returns successfully but not if it throws an exception.
  • B. Typically used to prevent any exception, thrown by the advised method, from propagating up the call-stack.
  • C. The advice has complete control over the method invocation; it could even prevent the method from being called at all.
  • D. The @AfterReturning advice allows behavior to be added after a method returns even if it throws an exception.

正解:A

解説:
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/aop/AfterReturningAdvice.html


質問 # 63
Which two options will inject the value of the daily.limit system property? (Choose two.)

  • A. @Value("$(daily.limit)")
  • B. @Value("$(systemProperties.daily.limit)")
  • C. @Value("#{systemProperties.daily.limit}")
  • D. @Value("#{systemProperties['daily.limit']}")
  • E. @Value("#{daily.limit}")

正解:B、D


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

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

正解:B、D

解説:
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


質問 # 65
......


この試験では、候補者がVMwareスプリングアプリケーションとそのコンポーネントを強く理解する必要があります。候補者は、これらのアプリケーションの開発と展開の経験も持つ必要があります。 Maven、Gradle、Spring Tool Suiteなど、VMware Spring開発で使用されるさまざまなツールやテクノロジーに精通している必要があります。

 

VCP-AM Develop 2022 2V0-72.22試験練習問題集:https://www.goshiken.com/VMware/2V0-72.22-mondaishu.html

2V0-72.22プレミアム資料テストPDFで無料問題集お試しセット:https://drive.google.com/open?id=1cy_296Eya5TaKV7xQmaNlA0j9Lob7xKa