Skip to content

Latest commit

 

History

History
117 lines (90 loc) · 1.99 KB

gradle.adoc

File metadata and controls

117 lines (90 loc) · 1.99 KB

1. Gradle

1.1. Konfiguracja

buildscript {
repositories {
jcenter()
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.6.RELEASE")
}
}

apply plugin: 'java'
apply plugin: 'spring-boot'
jar {
   baseName = 'mySimpleApp'
   version = '0.0.1-SNAPSHOT'
}
repositories {
   jcenter()
   ...
}
dependencies {
   compile 'org.springframework.boot:spring-boot-starter'
   compile("org.springframework.boot:spring-boot-starter-web")
   testCompile("org.springframework.boot:spring-boot-starter-test")
}
apply plugin: 'java'

repositories {
    jcenter()
}

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web:1.4.0.RELEASE")
}

1.2. spring-boot-gradle-plugin

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.0.RELEASE")
    }
}

apply plugin: 'java'
apply plugin: 'spring-boot'

repositories {
    jcenter()
}

dependencies {
    compile("org.springframework.boot:spring-boot-starter-web")
    testCompile("org.springframework.boot:spring-boot-starter-test")
}

1.3. Wyłączanie biblioteki

compile("org.springframework.boot:spring-boot-starter-web") {
exclude group: 'com.fasterxml.jackson.core'
}

1.4. Włączanie nowszej wersji

compile("com.fasterxml.jackson.core:jackson-databind:2.4.8")

1.5. Uruchamianie

gradle bootRun

export JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=128M