2022年最新の2V0-72.22プレミアム資料テストPDFの無料問題集お試しセット [Q32-Q52]

Share

2022年最新の2V0-72.22プレミアム資料テストPDFの無料問題集お試しセット

試験合格を向けて2V0-72.22今すぐ弊社のVCP-AM Develop 2022試験パッケージを使おう

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

  • A. Test methods in a @SpringBootTest class are transactional by default.
  • B. @SpringBootTest is typically used for integration testing.
  • C. Test methods annotated with @SpringBootTest will recreate the ApplicationContext.
  • D. @TestApplicationContext is used to define additional beans or customizations for a test.
  • E. @SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.

正解: B,C

 

質問 33
Which strategy is correct for configuring Spring Security to intercept particular URLs? (Choose the best answer.)

  • A. The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the most specific rule first and the least specific last.
  • B. Spring Security can obtain URLs from Spring MVC controllers, the Spring Security configuration just needs a reference to the controller to be protected.
  • C. The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the least specific rule first and the most specific last.
  • D. The URLs are specified in a special properties file, used by Spring Security.

正解: A

 

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

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

正解: D

 

質問 35
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 @PutMapping("/store/orders/{id"}", HttpStatus.NO_CONTENT).
  • B. Annotate the update() handler method with @ResponseStatus(HttpStatus.NO_CONTENT).
  • C. Annotate the update() handler method with @ResponseEntity(204).
  • D. The update() handler method cannot return a void type, it must return a ResponseEntity type.

正解: C

 

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

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

正解: A,B

 

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

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

正解: A,C

解説:
@SpringBootApplication.

 

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

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

正解: D

 

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

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

正解: B,D

 

質問 40
Which two options are REST principles? (Choose two.)

  • A. RESTful application use HTTP headers and status codes as a contract with the clients.
  • B. RESTful applications favor tight coupling between the clients and the servers.
  • C. RESTful applications use a stateless architecture.
  • D. RESTful applications cannot use caching.
  • E. RESTful application servers keep track of the client state.

正解: A,C

 

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

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

正解: C,D

解説:
BeanFactoryPostProcessor.

 

質問 42
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)")

正解: C,D

 

質問 43
Which two statements are true concerning the BeanPostProcessor Extension point? (Choose two.)

  • A. Custom BeanPostProcessors can be implemented for Spring applications.
  • B. BeanPostProcessors are called during the initialization phase of a bean life cycle.
  • C. BeanPostProcessors cannot be ordered in a Spring Boot application.
  • D. BeanPostProcessors are called before the BeanFactoryPostProcessors.
  • E. BeanPostProcessors are called before the dependencies have been injected.

正解: A,B

 

質問 44
Which statement defines a pointcut? (Choose the best answer.)

  • A. A module that encapsulated advices.
  • B. A point in the execution of a program such as a method call or field assignment.
  • C. An expression that selects one or more join points.
  • D. Code to be executed at each selected join point.

正解: C

 

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

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

正解: B,D

 

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

  • A. Use the @AutoConfigureAfter or @AutoConfigureBefore annotations to apply configuration in a specific order.
  • B. Provide customized auto-configuration by subclassing the provided Spring Boot auto-configuration classes.
  • C. Disable specific auto-configuration classes by using the exclude attribute on the
    @EnableAutoConfiguation annotation.
  • D. Control the order of auto-configuration classes applied with @AutoConfigureOrder.
  • E. Enable component scanning within auto-configuration classes to find necessary components.

正解: A,C

解説:
Section: (none)
Explanation

 

質問 47
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 and will replace existing a HelloService bean in the ApplicationContext.
  • C. A HelloService bean will be created from the helloService() method only when there is no other HelloService bean in the ApplicationContext.
  • D. This auto-configuration class is used only when the HelloService.class is on the classpath.
  • E. This auto-configuration class is used only when the HelloService.class is not on the classpath.

正解: C,D

 

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

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

正解: C

 

質問 49
Which two statements are true regarding storing user details in Spring Security? (Choose two.)

  • A. The user details includes username and password but not authorities.
  • B. With a custom UserDetailsService defined in the ApplicationContext, Spring Boot still creates the default user.
  • C. User details can be stored in a database, in LDAP, or in-memory.
  • D. Passwords must be hashed and the default hashing algorithm is MD5.
  • E. User details can be stored in custom storage and retrieve them by implementing the UserDetailsService interface.

正解: A,B

 

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

  • A. Ensure a valid bean name in the @Component annotation is specified.
  • B. Ensure a valid @Scope for the class is specified.
  • C. Ensure a valid @ComponentScan annotation in the Java configuration is specified.
  • D. Ensure a valid @Bean for the class is specified.

正解: A

 

質問 51
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 (Foo foo) {...}
  • B. @Autowired private Foo foo;
  • C. @Autowired public void setFoo (@Qualifier ("foo1") Foo foo) {...}
  • D. @Autowired public void setFoo(Foo foo2) {...}
  • E. @Autowired private Foo foo2;
  • F. @Autowired @Qualifier ("foo3") Foo foo;

正解: A,B,D

 

質問 52
......

2022年最新の問題をマスターVCP-AM Develop 2022合格目指して2V0-72.22リアル試験!:https://www.goshiken.com/VMware/2V0-72.22-mondaishu.html