title: Spring Boot Can't find main class Multi module
body: <p>I am having difficulties telling Spring the location of the Main class. So far I have only managed to correctly specify where it is when it is in pictures-service module (i.e., pictures-service/src/main/com.bachadiff.application/Application.java)</p>
  
  <p>This is the file structure.</p>
  
  <p><a href="https://i.stack.imgur.com/KRmza.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KRmza.png" alt="This is the file structure."></a></p>
  
  <p>And this is the main gradle file.</p>
  
  <pre><code>       buildscript {
          repositories {
              mavenCentral()
          }
          dependencies {
              classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE")
          }
      }
  
    plugins {
        id 'java'
        id 'java-library'
        id 'idea'
        id "org.springframework.boot" version "2.0.2.RELEASE"
        id "io.spring.dependency-management" version "1.0.5.RELEASE"
    }
  
      bootJar {
          baseName = 'com.bachadiff.pictures-service'
          version = '0.1.0'
          mainClassName = 'com.bachadiff.application.Application'
  
      }
      version = '0.1.0'
  
      repositories {
          mavenCentral()
      }
  
      sourceCompatibility = 1.8
      targetCompatibility = 1.8
  
      ext.common = [
              spring_web  : 'org.springframework.boot:spring-boot-starter-web:2.0.2.RELEASE',
              spring_rest : 'org.springframework.boot:spring-boot-starter-data-rest:2.0.2.RELEASE',
              spring_mongo: 'org.springframework.boot:spring-boot-starter-data-mongodb:2.0.2.RELEASE',
              spring_test : 'org.springframework.boot:spring-boot-starter-test'
      ]
  
      ext.test = [
              junit: 'junit:junit:4.12'
      ]
  
      dependencies {
          api 'org.springframework.boot:spring-boot-starter-web:2.0.2.RELEASE'
          api 'org.springframework.boot:spring-boot-starter-data-rest:2.0.2.RELEASE'
          api 'org.springframework.boot:spring-boot-starter-data-mongodb:2.0.2.RELEASE'
          compile project(':pictures-service-impl')
          testImplementation 'org.springframework.boot:spring-boot-starter-test'
      }
  </code></pre>