Building a RESTful Web Service :: Learn how to create a RESTful web service with Spring. :: spring-boot http://spring.io/guides/gs/rest-service/

123456789101112131415161718192021222324252627282930313233343536
  1. buildscript {
  2. repositories {
  3. maven { url "http://repo.spring.io/libs-release" }
  4. mavenLocal()
  5. mavenCentral()
  6. }
  7. dependencies {
  8. classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.1.RELEASE")
  9. }
  10. }
  11. apply plugin: 'java'
  12. apply plugin: 'eclipse'
  13. apply plugin: 'idea'
  14. apply plugin: 'spring-boot'
  15. jar {
  16. baseName = 'gs-rest-service'
  17. version = '0.1.0'
  18. }
  19. repositories {
  20. mavenLocal()
  21. mavenCentral()
  22. maven { url "http://repo.spring.io/libs-release" }
  23. }
  24. dependencies {
  25. compile("org.springframework.boot:spring-boot-starter-web")
  26. testCompile("junit:junit")
  27. }
  28. task wrapper(type: Wrapper) {
  29. gradleVersion = '1.11'
  30. }