Sobes.tech
Junior — Middle

What parameters and settings do you usually specify in Spring Boot configuration files for your project?

sobes.tech AI

Answer from AI

In Spring Boot configuration files (usually application.properties or application.yml), the following parameters are typically set:

  • server.port — the port on which the application runs.
  • spring.datasource.url, spring.datasource.username, spring.datasource.password — database connection settings.
  • spring.jpa.hibernate.ddl-auto — database schema update strategy (e.g., update, validate, create).
  • logging.level. — logging level for different packages.
  • spring.profiles.active — active configuration profile (dev, prod, etc.).
  • management.endpoints.web.exposure.include — which actuator endpoints are accessible.

Example application.properties:

server.port=8081
spring.datasource.url=jdbc:postgresql://localhost:5432/mydb
spring.datasource.username=user
spring.datasource.password=pass
spring.jpa.hibernate.ddl-auto=update
logging.level.org.springframework=INFO
spring.profiles.active=dev