Exam 2v0-7222 All QuestionsBrowse all questions from this exam
Question 11

Which dependency enables an automatic restart of the application as code is changed during development of a Spring boot configuration on a web application? (Choose the best answer.)

    Correct Answer: A

    The correct dependency to enable an automatic restart of the application as code is changed during development in a Spring Boot web application is 'spring-boot-devtools'. This dependency is specifically designed to improve the development experience by providing features such as automatic restarts, live reload, and configurations for faster development. The other options either do not exist or do not serve this purpose.

Discussion
james2033Option: A

<dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency> </dependencies> https://docs.spring.io/spring-boot/docs/1.5.16.RELEASE/reference/html/using-boot-devtools.html#using-boot-devtools

rhuancaOption: C

C is more specific for this purpose

Verixas

The is no spring-boot-starter-devtools dependency, A answer is correct (spring-boot-devtools)