Summer Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exc65

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

A.

Add @EnableTransactionManagement to a Java configuration class.

B.

Annotate a class, an interface, or individual methods requiring a transaction with the @Transactional

annotation.

C.

A class must be annotated with @Service and @Transaction.

D.

A class requiring a transaction must implement the TransactionInterceptor interface.

E.

Write a Spring AOP advice to implement transactional behavior.

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.

Disable specific auto-configuration classes by using the exclude attribute on the

@EnableAutoConfiguation annotation.

C.

Provide customized auto-configuration by subclassing the provided Spring Boot auto-configuration classes.

D.

Enable component scanning within auto-configuration classes to find necessary components.

E.

Control the order of auto-configuration classes applied with @AutoConfigureOrder.

Refer to the exhibit.

Assume that the application is using Spring transaction management which uses Spring AOP internally.

Choose the statement that describes what is happening when the update1 method is called? (Choose the best answer.)

A.

There are 2 transactions because REQUIRES_NEW always runs in a new transaction.

B.

An exception is thrown as another transaction cannot be started within an existing transaction.

C.

There is only one transaction because REQUIRES_NEW will use an active transaction if one already exists.

D.

There is only one transaction initiated by update1() because the call to update2() does not go through the proxy.

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 missing but not when a bean is present.

C.

Auto-configuration is applied by processing candidates listed in META-INF/spring.factories.

D.

Auto-configuration could apply when a bean is present but not when a bean is missing.

E.

Auto-configuration is applied before user-defined beans have been registered.

Which two statements are true concerning constructor injection? (Choose two.)

A.

If there is only one constructor the @Autowired annotation is not required.

B.

Constructor injection only allows one value to be injected.

C.

Constructor injection is preferred over field injection to support unit testing.

D.

Construction injection can be used with multiple constructors without @Autowired annotation.

E.

Field injection is preferred over constructor injection from a unit testing standpoint.

Which two statements are correct regarding the Actuator info endpoint? (Choose two.)

A.

It provides configuration options through which only an authenticated user can display application information.

B.

It is not enabled by default.

C.

It can be used to display arbitrary application information.

D.

It can be used to change a property value on a running application.

E.

Typically it is used to display build or source control information.

Which statement about @TestPropertySource annotation is true? (Choose the best answer.)

A.

Java system properties have higher precedence than the properties loaded from

@TestPropertySource.

B.

Properties defined @PropertySource are not loaded if @TestPropertySource is used.

C.

@TestPropertySource annotation loads a properties file relative to the root of the project by default.

D.

Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.

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

A.

@TestApplicationContext is used to define additional beans or customizations for a test.

B.

Test methods in a @SpringBootTest class are transactional by default.

C.

@SpringBootTest is typically used for integration testing.

D.

Test methods annotated with @SpringBootTest will recreate the ApplicationContext.

E.

@SpringBootTest without any configuration classes expects there is only one class annotated with @SpringBootConfiguration in the application.

Refer to the exhibit.

Which two statements are correct regarding auto-configuration of DataSource and JdbcTemplate beans given a Spring Boot application with only these two dependencies? (Choose two.)

A.

A DataSource bean will not be auto-configured.

B.

A JdbcTemplate bean will not be auto-configured.

C.

A JdbcTemplate bean will be auto-configured.

D.

A DataSource bean will be auto-configured only if a JdbcTemplate bean is explicitly defined.

E.

A DataSource bean will be auto-configured.

Which two statements are correct regarding the Health Indicator status? (Choose two.)

A.

The last status in a sorted list of HealthIndicators is used to derive the final system health.

B.

The status with the least severity is used as the top-level status.

C.

Custom status values can be created.

D.

The built-in status values are DOWN, OUT_OF_SERVICE, UNKNOWN, and UP in decreasing order of severity.

E.

The severity order cannot be changed due to security reasons.