Backend Development
Spring Boot
Subjective
Oct 03, 2025
Explain Spring Boot Profiles with example.
Detailed Explanation
Profiles provide environment-specific configuration:\n\napplication-dev.properties:\nspring.datasource.url=jdbc:h2:mem:devdb\n\napplication-prod.properties:\nspring.datasource.url=jdbc:mysql://prod-server/db\n\nActivate: spring.profiles.active=dev\n\n@Profile("dev")\n@Component\npublic class DevDataLoader { }
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts