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

build.gradle 847B

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