eclipse - Spring Boot“Hello World”示例给出了运行方法异常
问题描述
在收到质疑我智力的暗示性评论之前,我会说我只是按照 Spring 官方网站 ( https://spring.io/guides/gs/rest-service/ ) 上提供的指导进行操作。作为奖励,我收到了一个错误。
不需要定义文档中未说明的任何内容,Gradle 构建是复制粘贴的,那么问题出在哪里?
构建.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'
bootJar {
baseName = 'gs-rest-service'
version = '0.1.0'
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile('org.springframework.boot:spring-boot-starter-test')
}
解决方案
推荐阅读
- python-3.x - 在python 3,pygame中绘制一个旋转的矩形
- ios - iOS 中的类和线程:viewModel 场景
- c# - 如何在页面内的网格顶部分层元素,有效地忽略某些元素的网格?
- python - 在 python 中替代 pygame 文本渲染
- firebase - 检查 Flutter Firestore 中是否已存在字段
- google-analytics - redux-beacon:增强的电子商务操作不会被触发
- encryption - 传输中和静态的 Azure 媒体服务加密
- c# - 如何在 Unity 中更改父对象的位置
- javascript - goBack 导航调用后未调用 componentDidMount
- javascript - 在 Angular 中渲染视图后如何渲染 javascript 文件