Question 1
Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation? (Choose the best answer.)
Which statement describes the propagation behavior of Propagation.REQUIRES_NEW annotation? (Choose the best answer.)
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.)
The @Bean annotation is used to declare a method that returns an object that should be registered as a bean in the application context. The @ConditionalOnBean annotation is used to specify a condition for the bean creation based on the presence or absence of other beans in the application context. The name attribute of this annotation can be used to specify the bean name or names that must be present or absent for the condition to match. However, this approach is less flexible than using the value or type attribute, which can specify the bean class or classes that must be present or absent for the condition to match. Therefore, it is recommended to use @ConditionalOnBean(DataSource.class) instead of @ConditionalOnBean(name= ''dataSource'') for greater flexibility.
The JdbcTemplate class is a Spring class that simplifies the use of JDBC and helps to avoid common errors. It executes core JDBC workflow, leaving application code to provide SQL and extract results. To create a JdbcTemplate object, we need to pass a DataSource object as a constructor argument. The DataSource interface is a Java interface that represents a factory of connection objects. In this code, the jdbcTemplate() method takes a DataSource object as a parameter and returns a new JdbcTemplate object. This method is annotated with @Bean and @ConditionalOnBean(name= ''dataSource''), which means that it will only create a JdbcTemplate bean when there is already a bean named dataSource in the application context.
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.)
Spring Boot will find and load property files in which of the following? (Choose the best answer.)
What's the password storage format when using the DelegatingPasswordEncoder?
https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/crypto/password/DelegatingPasswordEncoder.html
Which three types can be used as @Controller method arguments? (Choose three.)
A . Locale
This is true because the Locale argument can be used to resolve the current locale that the client is using, based on the Accept-Language header or a cookie1.
B . Principal
This is true because the Principal argument can be used to access the currently authenticated user, if any1.
F . HttpSession
This is true because the HttpSession argument can be used to access the current session, if any1. Note that this argument is not required and will be null if a session does not exist.
Refer to the exhibit.

How can a Spring Bean be created from this LegacySingleton class?
Which two are required to use transactions in Spring? (Choose two.)
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 ortx: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.
Refer to the exhibit.

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