2016-10-05 11 views
1

我正在嘗試在AWS上將編碼設置爲我的Java應用程序。InvalidParameterValue:未知模板參數:JVMOptions

我在environment.config文件中的以下內容:

option_settings: 
    - namespace: aws:elasticbeanstalk:container:tomcat:jvmoptions 
     option_name: JVM Options 
     value: -Dfile.encoding=UTF8 

然而,當我部署應用程序到雲,我得到的錯誤狀態在AWS:

2016-10-05 09:07:13 UTC+0200 ERROR Failed to deploy application. 
2016-10-05 09:07:13 UTC+0200 ERROR InvalidParameterValue: Unknown template parameter: JVMOptions 

我在做什麼錯誤?

回答

0

使用命名空間aws:elasticbeanstalk:container:tomcat:jvmoptions時我得到了相同的錯誤,因爲我意識到我沒有在Elastic Beanstalk(Spring Boot)上使用tomcat。

嘗試使用代替aws:elasticbeanstalk:application:environment

由於它被描述:

注意您可以擴展參數的數量和AWS指定參數 名稱:elasticbeanstalk:容器:tomcat的:jvmoptions和 AWS:elasticbeanstalk:應用:環境命名空間。

在此link

+0

非常感謝這個答案。它對我來說非常合適。我希望它也適用於OP。這是一個恥辱沒有反饋提供:) – 2017-10-08 21:16:26

+0

有一點要補充。我根據這個存儲庫在.ebextensions中命名文件env.config https://github.com/awslabs/eb-java-scorekeep/tree/master/.ebextensions – 2017-10-08 21:19:02