Not an expert but Gradle is what the (Spring Boot) project is using. I have a @Component
which runs setting up dummy data, but I only want it to run locally. So now I have put an @Profile("local123")
over it too and this turns the component off. Great.
Next I wanted to put in Eclipse's Run Configurations... > JVM Arguments
the -Dspring.profiles.active=local123
so that the component is turned on but only when I'm running my build locally. No joy. I have seen some posts that say you need to add this or similar to build.gradle
bootRun {
systemProperties System.properties
}
but anywhere I try to add it in the file, it causes my build to crash.
- Where am I going wrong? and/or
- Where do I get documentation on the structure of build.gradle to work out where this should go!