3

I am going to test external config for application. What is default classpath and default working directory for Spring Boot Gradle bootRun task?

I didn't get in from:

UPDATE test with System.getProperty("user.dir") show that current directory is where Gradle is started.

gavenkoa
  • 45,285
  • 19
  • 251
  • 303

1 Answers1

2

Working directory is actually the module with Spring Boot project, which does not necessarily have to be the rootProject.

Classpath for bootRun is:

  • working directory (or Gradle project directory with Spring Boot)
  • main classes
  • runtime classpath

At least this is what seems to be the default when I debug the build (now easily possible with IntelliJ IDEA 2018.2).

virgo47
  • 2,283
  • 24
  • 30