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

build.gradle 796B

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