App Engine 配置问题

发布于 2024-10-01 11:39:58 字数 899 浏览 6 评论 0原文

尝试通过 yaml 配置我的 java GAE 实例。我使用的 JS 库在构建过程中生成一个 dir 结构;我正在尝试将 url 映射到静态目录结构。

application: scserver
version: 1
runtime: java

handlers:
- url: /static/(.*)/detect-browser
  static_files: static/\1/detect-browser
  upload: static/(.*)/detect-browser
  mime_type: text/javascript

- url: /app/(..)
  static_files: static/app/\1/index.html
  upload: static/app/(.*)/index.html
  mime_type: text/html

- url: /app
  static_files: static/app/en/619741d07103b901ab82148129831c8d1ac0ff8d/index.html
  upload: static/app/en/619741d07103b901ab82148129831c8d1ac0ff8d/index.html
  mime_type: text/html

- url: /static
  static_dir: static  

- url: /app
  static_dir: static/app

-static_files:
  - include: /static/**

我明白了

第 7 行第 15 列:无法找到 类上的属性“static_files”: com.google.apphosting.utils.config.AppYaml$Handler

任何帮助将不胜感激

Trying to configure my java GAE instance via yaml. The JS library I am using generates a dir structure as part of its build process; I am trying to map urls to the static dir structure.

application: scserver
version: 1
runtime: java

handlers:
- url: /static/(.*)/detect-browser
  static_files: static/\1/detect-browser
  upload: static/(.*)/detect-browser
  mime_type: text/javascript

- url: /app/(..)
  static_files: static/app/\1/index.html
  upload: static/app/(.*)/index.html
  mime_type: text/html

- url: /app
  static_files: static/app/en/619741d07103b901ab82148129831c8d1ac0ff8d/index.html
  upload: static/app/en/619741d07103b901ab82148129831c8d1ac0ff8d/index.html
  mime_type: text/html

- url: /static
  static_dir: static  

- url: /app
  static_dir: static/app

-static_files:
  - include: /static/**

I get

Line 7, column 15: Unable to find
property 'static_files' on class:
com.google.apphosting.utils.config.AppYaml$Handler

any help would be appreciated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧人 2024-10-08 11:39:58

您肯定使用的是 Python yaml 配置规范。
查看具有不同语法的 Java 应用程序配置

You are definitely using the Python yaml configuration spec.
Have a look to the Java Application Configuration that has a different syntax.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文