What is the primary file used to define properties in Spring Boot?
- application.properties
- application.yml
- bootstrap.properties
- config.properties
In Spring Boot, the application.properties file is the primary file used to define properties. This file allows you to configure various aspects of the application, such as server port, database connections, etc. The application.properties file is typically located in the src/main/resources directory, and its properties are loaded at runtime by Spring Boot. The properties defined in this file can also be overridden by external configurations.
Loading...
Related Quiz
- The _____ file is crucial for defining custom Auto Configuration classes in Spring Boot.
- In a Spring application with multiple security configurations, how would you ensure that the security annotations on service methods are evaluated in the correct order to enforce the intended security constraints?
- What is the primary purpose of the @SpringBootTest annotation in Spring Boot testing?
- In Spring Framework, what is the difference between @Autowired and @Inject annotations?
- Suppose you are working on a project where you need to create several beans with business logic, database interaction, and APIs. How would you use different annotations to organize and define these beans properly?