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. mavenCentral()
  4. }
  5. dependencies {
  6. classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.5.RELEASE")
  7. }
  8. }
  9. apply plugin: 'java'
  10. apply plugin: 'eclipse'
  11. apply plugin: 'idea'
  12. apply plugin: 'spring-boot'
  13. jar {
  14. baseName = 'gs-rest-service'
  15. version = '0.1.0'
  16. }
  17. repositories {
  18. mavenCentral()
  19. }
  20. sourceCompatibility = 1.8
  21. targetCompatibility = 1.8
  22. dependencies {
  23. compile("org.springframework.boot:spring-boot-starter-web")
  24. testCompile('org.springframework.boot:spring-boot-starter-test')
  25. testCompile('com.jayway.jsonpath:json-path')
  26. }
  27. task wrapper(type: Wrapper) {
  28. gradleVersion = '2.3'
  29. }