我在这里遵循了春季教程:https ://spring.io/guides/gs/rest-service/并让它工作。然后我按照关于连接到 MySQL DB 的教程进行操作,并在 build.gradle 中添加了依赖项。boxfuse 似乎没有检测到它。
MacBook-Pro-2 ~/work/test/server (develop) $ boxfuse info
Boxfuse client v.1.22.2.1149
Copyright 2016 Boxfuse GmbH. All rights reserved.
Account: ...
Info about ... in the dev environment:
App Type : Single Instance (Elastic IP)
App URL :
DB Type : No database
Logs Type : No centralized logging
在我的 build.gradle 文件中,我只有:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.1.RELEASE")
classpath 'mysql:mysql-connector-java:5.1.16'
}
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
testCompile('org.springframework.boot:spring-boot-starter-test')
compile('mysql:mysql-connector-java:5.1.16')
}
为了完成这项工作,我错过了一步吗?
编辑:我在http://start.spring.io/上使用启动项目工具尝试了“boxfuse info”,并选择了 JDBC 和 MySQL 的依赖项:
编译成 jar 并在 jar 所在的构建目录中运行 boxfuse。它仍然没有检测到数据库。