我在这里学习了spring教程:https://spring.io/guides/gs/rest-service/并让它正常工作。然后,我学习了关于连接到MySQL DB的教程,并在build.gradle中添加了依赖项。箱式保险丝似乎没有察觉到。
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“,并选择了用于JDBC和MySQL的依赖项:

编译到jar中,并在jar所在的构建目录中运行box引信。它仍然没有检测到DB。
发布于 2016-11-08 08:54:16
如果您的应用程序以前是在db.type设置为none的情况下创建的,那么您需要销毁并重新创建它,以再次触发自动检测并更改db类型。要做到这一点,请转到您的项目目录并发出
$ boxfuse destroy $ gradle build $ boxfuse create
Boxfuse将在部署时正确地拾取MySQL驱动程序,并在每个环境中自动提供数据库。
https://stackoverflow.com/questions/40471222
复制相似问题