【发布时间】:2015-01-03 06:01:18
【问题描述】:
我有一个 Spring Boot 应用程序,我正在尝试找出将其部署到 Google 新的托管 VM 环境(这些是能够运行 Docker 容器的 VM)的位。我已经开始使用以下内容定义 app.yaml:
application: myapp-1
version: 1
runtime: java
api_version: 1
vm: true
handlers:
- url: /*
servlet: org.springframework.web.servlet.DispatcherServlet
init_params:
contextAttribute: org.springframework.web.context.WebApplicationContext.ROOT
然后我运行以下命令从我的应用程序根目录中进行测试:
gcloud --verbosity debug preview app run .
我一直在反复试验,现在遇到以下异常:
Unknown url handler type.
<URLMap
secure=default
static_files=None
application_readable=None
auth_fail_action=redirect
require_matching_file=None
static_dir=None
redirect_http_response_code=None
http_headers=None
url=/*
script=None
upload=None
api_endpoint=None
expiration=None
position=None
login=optional
mime_type=None
>
我使用https://cloud.google.com/appengine/docs/java/configyaml/appconfig_yaml 作为指导,但我开始怀疑托管 VM 环境是否支持 app.yaml 格式。
这里有一个类似的例子https://github.com/GoogleCloudPlatform/appengine-java-vm-guestbook-extras,但它不使用 app.yaml 格式。
最近有没有让 Spring Boot 应用在 Google 托管 VM 中运行的示例?
【问题讨论】:
标签: google-app-engine docker spring-boot google-compute-engine