我已经用Spring Boot和Gradle在Spring Tool Suite中创建了一个项目,我真的不知道如何导出才能使其工作。如何将Spring Boot项目导出到可执行的独立文件?
我不太了解gradle,只是从maven仓库添加依赖的基础知识。所以在一些文章中说应用应用程序插件来完成任务,但我不知道如何设置配置文件以及如何创建可执行文件。
如果任何人都可以编写或链接一步一步的详细解释如何做到这一点,将非常感激。
这是我的build.gradle文件:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.1.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
springBoot {
mainClass = "com.rodamientosbulnes.objetivosventa.Application"
executable = true
}
jar {
baseName = 'objetivosventa'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile('org.springframework.boot:spring-boot-starter')
compile('org.springframework:spring-jdbc')
compile('net.sourceforge.jtds:jtds:1.3.1')
compile('org.apache.poi:poi-ooxml:3.13')
compile('com.miglayout:miglayout-swing:4.2')
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}
谢谢!!,我真是一个白痴,我不知道它只是建立任务而创建的。 – giorgiline