79451865

Date: 2025-02-19 15:17:04
Score: 1.5
Natty:
Report link

Have application-test.properties file with only the property you want to override, and set active profile to test.

Spring boot automatically merges properties from application-test.properties and application.properties files. Property mentioned in application-test.properties overrides the property mentioned in application.properties.

See this post about setting active profile: Setting the default active profile in Spring-boot

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Learner