2V0-72-22 practice question 1 of 15
Which two statements describe Spring JdbcTemplate? (Choose two.)
Full set: 79 questionsThe Spring JdbcTemplate class is the central class in the JDBC core package. It simplifies the use of JDBC and helps to avoid common errors. It executes SQL queries, update statements, and stored procedure calls, performing iteration over ResultSets and extraction of returned parameter values. It also translates the checked SQLExceptions from the JDBC API into a hierarchy of unchecked DataAccessExceptions, relieving the developer from handling specific database vendor error codes.
A. JdbcTemplate translates checked SQLExceptions into a hierarchy of unchecked DataAccessExceptions, so you are not required to handle SQLException directly.
C. The update method in JdbcTemplate can be used for INSERT, UPDATE, and DELETE operations, not just updates.
E. JdbcTemplate executes SQL statements that you provide; it does not generate them. SQL generation is a feature of ORM frameworks like JPA.
1. Spring Framework Documentation. (Version 6.1.6). Data Access, Section 1.2.3, "JdbcTemplate". "The template provides methods for querying... and for performing updates...".
2. Spring Framework Documentation. (Version 6.1.6). Data Access, Section 1.2.1, "Choosing an Approach for JDBC Database Access". "The JdbcTemplate... converts the standard JDBC SQLExceptions into a hierarchy of generic, more informative, unchecked exceptions."
3. Spring Framework Documentation. (Version 6.1.6). API Reference, org.springframework.jdbc.core.JdbcTemplate. The class documentation lists methods like query(String sql, ResultSetExtractor rse) and update(String sql, @Nullable Object... args).
Keep practicing
Take the free 2V0-72-22 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 2V0-72-22 practice questions
- Question 2Which two options will inject the value of the daily.limit system property? (Choose two.)
- Question 3Which two statements are true regarding Spring and Spring Boot Testing? (Choose two.)
- Question 4Which two statements are correct regarding Spring Boot auto-configuration customization? …
- Question 5Which two statements are true about @Controller annotated classes? (Choose two.)
- Question 6Which statement is true? (Choose the best
- Question 8Which two statements are correct regarding the Health Indicator status? (Choose two.)
