I have set up my Spring Boot application so that my H2 embedded database is populated at startup. I've done this by creating a data.sql file in the src/main/resources
folder.
What I don't understand is what causes this to run at startup.
Also, I'd like to make this conditional - e.g. prevent it from executing when I'm running unit tests. Is this possible?
A similar question was asked here, but it is unresolved.