我是 Java 和 Spring 的新手。我尝试从https://spring.io/guides/gs/having-web-service/开始 ,我将初始和完整解决方案的内容下载到带有 gradle bulidship 2.0 的 STS 3.9.5 IDE 中。但是安装这个项目还没有准备好使用。在包hello中导入似乎很糟糕。
导入 io.spring.guides.gs_having_web_service.GetCountryRequest; 导入 io.spring.guides.gs_having_web_service.GetCountryResponse;
我收到消息“导入 io 无法解析”
我该如何修复它?
我没有更改 bulid.gradle 中的任何内容:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.5.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
repositories {
mavenCentral()
}
// tag::xsd[]
task genJaxb {
ext.sourcesDir = "${buildDir}/generated-sources/jaxb"
ext.classesDir = "${buildDir}/classes/jaxb"
ext.schema = "src/main/resources/countries.xsd"
outputs.dir classesDir
doLast() {
project.ant { …Run Code Online (Sandbox Code Playgroud)