For configuring a DataSource programmatically in Spring Boot, you can create a @Bean of type _____.
- javax.sql.DataSource
- org.springframework.boot.datasource.DataSource
- org.springframework.jdbc.datasource.DataSource
- spring.datasource
To configure a DataSource programmatically in Spring Boot, you can create a @Bean of type javax.sql.DataSource or its Spring-specific equivalents. This allows you to define the data source properties and configure database connectivity in your application. The choice of the correct data source bean is crucial for proper database interaction in your Spring Boot application.
Loading...
Related Quiz
- Can Bean Validation be applied to method parameters in Spring Boot, and if so, how?
- If you want to specify that a configuration will be applied only if a specific class is present, you would use the @_____ annotation in Spring Boot.
- Reactive Streams in Spring Boot offer _____ to handle the flow of data between the producer and consumer.
- In a Spring Boot application, how would you handle a scenario where different microservices need to work with different databases and schemas?
- In Spring Boot, to order the execution of validation groups, the _____ interface needs to be implemented along with defining a sequence list of groups.