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

build.gradle 714B

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