【发布时间】:2017-05-21 07:06:54
【问题描述】:
我正在使用 IntelliJ 15.0.6、SpringBoot 1.4.3.RELEASE、Gradle 2.14 和 Groovy 2.3.11。
我从 IntelliJ 收到以下消息:
我尝试关注StackOverFlow、the official documentation 和JavaCodeGeeks,但没有成功。
这是我的配置文件:
@Configuration
@ConfigurationProperties(prefix = "configuracoes")
class GeralConfiguration {
def proxyEndereco
def proxyPorta
}
以及我的 application.yaml 文件的相关部分:
configuracoes:
proxyEndereco: http://fake.com
proxyPorta: 8080
如果我从配置文件中删除 @ConfigurationProperties,消息就会消失。
这是我的 build.gradle 文件:
buildscript {
repositories {
mavenLocal()
maven {url('http://repo.spring.io/plugins-release')}
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.3.RELEASE")
classpath('org.springframework.build.gradle:propdeps-plugin:0.0.7')
}
}
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'propdeps'
apply plugin: 'propdeps-idea'
sourceCompatibility = 1.7
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.boot:spring-boot-devtools")
optional("org.springframework.boot:spring-boot-configuration-processor")
compile('org.codehaus.groovy:groovy-all:2.3.11')
compile('com.machinepublishers:jbrowserdriver:0.17.3')
compile("org.im4java:im4java:1.4.0")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("org.spockframework:spock-core:1.1-groovy-2.4-rc-3")
}
compileJava.dependsOn(processResources)
compileGroovy.dependsOn(processResources)
关于发生了什么以及如何解决此问题的任何想法?
【问题讨论】:
标签: intellij-idea gradle groovy spring-boot