In Spring Boot, the _____ annotation can be used to inject the value of a specific property into a field.
- @Autowired
- @Inject
- @Property
- @Value
In Spring Boot, you can use the @Value annotation to inject the value of a specific property into a field. This annotation allows you to inject property values from your application.properties or application.yml file directly into your Spring components, making it convenient to access configuration properties within your application code.
Loading...
Related Quiz
- In Spring Security, what is the significance of configuring a global method security, and how does it differ from standard method security configurations?
- Which of the following is true about the deleteById method of a JpaRepository?
- What does the findAll method of a JpaRepository return?
- What is the primary purpose of Auto Configuration in Spring Boot?
- How can you configure a custom cache manager in Spring Boot?