我试图将一个本机库( .dll文件)添加到一个基本的spring项目中。我尝试过许多不同的设置,但它们都无法在一个基本的java项目中运行,我已经通过添加VM参数成功地运行了这个dll文件: java.library.path gradle,这是脚本:
buildscript {
ext {
springBootVersion = '1.2.5.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
jar {
baseName = 'messaging'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-aop")
compile("org.springframework.boot:spring-boot-starter-amqp")
compile("org.springframework:spring-messaging")
compile('javax.inject:javax.inject:1')
compile('com.google.guava:guava:11.0.2')
compile('org.codehaus.jackson:jackson-core-asl:1.1.0')
compile('org.codehaus.jackson:jackson-mapper-asl:1.9.13')
testCompile("org.springframework.boot:spring-boot-starter-test")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.3'
}我试过:
在eclipse上添加VM参数,添加jvm属性,添加gradle系统属性(无法成功添加该参数)
发布于 2015-08-29 17:11:11
我不明白为什么,但是当我遵循以下步骤时,它起了作用: 1.更改了java包名2.用gradle 3重新构建项目。
https://stackoverflow.com/questions/32138618
复制相似问题