Building an Application with Spring Boot :: Learn how to build an application with minimal configuration. https://spring.io/guides/gs/spring-boot/

12345678910111213141516171819202122232425262728293031323334353637383940
  1. buildscript {
  2. repositories {
  3. mavenCentral()
  4. }
  5. dependencies {
  6. classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE")
  7. }
  8. }
  9. apply plugin: 'java'
  10. apply plugin: 'eclipse'
  11. apply plugin: 'idea'
  12. apply plugin: 'org.springframework.boot'
  13. jar {
  14. baseName = 'gs-spring-boot'
  15. version = '0.1.0'
  16. }
  17. repositories {
  18. mavenCentral()
  19. }
  20. sourceCompatibility = 1.8
  21. targetCompatibility = 1.8
  22. dependencies {
  23. // tag::jetty[]
  24. compile("org.springframework.boot:spring-boot-starter-web") {
  25. exclude module: "spring-boot-starter-tomcat"
  26. }
  27. compile("org.springframework.boot:spring-boot-starter-jetty")
  28. // end::jetty[]
  29. // tag::actuator[]
  30. compile("org.springframework.boot:spring-boot-starter-actuator")
  31. // end::actuator[]
  32. testCompile("junit:junit")
  33. }