Whenever you install packages, you will need to sometimes configure things before making them work

For example: when installing both of these packages:

  1. spring-boot-starter-data-jpa
  2. postgresql
  • The JPA package relies on the database driver, so you can’t install the JPA by itself.
  • the Postgres connection also needs to be setup and configured before installing the packages too. Example: This is what you should add and configure to your application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/demo
spring.datasource.username=demo
spring.datasource.password=demo
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update

Question

Why is this behaviour made in SpringBoot?