I am using Spring Boot 1.3.0.M5 and I am trying to take advantage of devtools. This allows you to make changes to your application while in development and boot will reload your application. I have seen this demo work in STS using Java and Maven.
I am trying to use Groovy & Gradle in IntelliJ 14.1 and I am having some issues. First here is my Gradle Build dependencies.
dependencies {
compile("org.springframework.boot:spring-boot-devtools")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.codehaus.groovy:groovy")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
I created a controller with a mapping for "/"
package demo
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
class HomeController {
@RequestMapping("/")
public String home(){
"Hello, SpringOne 2GX!"
}
}
I am able to run the application and visit http://localhost:8080 and see the string print to the screen. If I make a change to the file nothing happens because IntelliJ does not compile on change. If you go to Build > Make Project though I can see Spring Boot in the console reload. So this seems to be working but if I go back to the root URL I get the following error which is basically what you would see if you had no controllers in place.
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Sep 17 10:43:25 EDT 2015 There was an unexpected error (type=Not Found, status=404). No message available
Anyone know why the reload is not working correctly for me?