Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the Spring Boot integration with Intellij to enable Spring Loaded out of the box. #887

Closed
berlin-ab opened this issue May 15, 2014 · 3 comments
Labels
status: duplicate A duplicate of another issue

Comments

@berlin-ab
Copy link

After some help from @rwinch, we've been able to drop this configuration into our build.gradle, make a change, compile from either our browser or the command line, and see the change made in the application without a restart.

// build.gradle
apply plugin: 'idea'
idea {
   module {
      inheritOutputDirs = false
      outputDir = file("$buildDir/classes/main/")
  }
}

Note:

  • Intellij must be configured to use the same Java version as the command line gradle task.
  • Enable "Make Project Automatically", Intellij will compile your changes after save and they will be available
  • Spring Loaded must be a buildscript dependency

Here's an example project:
berlin-ab/cats@c9ce250

it's on the feature/autoreload branch.

the full build.gradle

// build.gradle
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'

idea {
    module {
        inheritOutputDirs = false
        outputDir = file("$buildDir/classes/main/")
    }
}

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:1.0.2.RELEASE"
        classpath 'org.springframework:springloaded:1.2.0.RELEASE'
    }
}
@berlin-ab
Copy link
Author

We'd still prefer the automatic incremental compilation as described in: #827, but this is a nice first step.

@philwebb
Copy link
Member

I'll change this to a documentation issue for now. We might also want to update start.spring.io I guess.

@philwebb philwebb removed this from the 1.1.0.M2 milestone May 16, 2014
@philwebb
Copy link
Member

Closing this one as a duplicate of #823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants