What is the primary purpose of configuring a Data Source in a Spring Boot application?
- To define the application's main class.
- To configure the application's logging.
- To manage the application's dependencies.
- To establish a connection to a database.
Configuring a Data Source in a Spring Boot application is primarily done to establish a connection to a database. This is crucial for applications that need to interact with a database to store or retrieve data. While the other options are essential in a Spring Boot application, they are not the primary purpose of configuring a Data Source.
Loading...
Related Quiz
- You are developing an application with multiple authentication providers, including LDAP and a custom database. How would you configure Spring Security to authenticate users using multiple authentication providers?
- To authorize access to method-level security in Spring Security, the _______ annotation can be used.
- The _____ annotation is used to mark the main class of a Spring Boot application.
- For a service to register itself with Eureka, it must have the _____ annotation in its main application class.
- To define hierarchical properties in a YAML configuration file in Spring Boot, you can use _____.