小编use*_*046的帖子

为什么我的 IntelliJ IDEA 项目没有找到这个导入?

尝试遵循此处的指南https://spring.io/guides/gs/rest-service/#scratch

这是我的 Gradle 文件

version '1.0'

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.3.RELEASE")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'

jar {
    baseName = 'gs-rest-service'
    version =  '0.1.0'
}

repositories {
    mavenCentral()
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
    compile("org.springframework.boot:spring-boot-starter-web")
    testCompile('org.springframework.boot:spring-boot-starter-test')
    testCompile('com.jayway.jsonpath:json-path')
}
Run Code Online (Sandbox Code Playgroud)

And just for context, a screen of my project:

https://i.stack.imgur.com/m8aqE.png

For some reason when I hit build, it …

java import spring intellij-idea gradle

3
推荐指数
1
解决办法
2915
查看次数

标签 统计

gradle ×1

import ×1

intellij-idea ×1

java ×1

spring ×1