3
我嘗試過使用我的應用的jar和war版本,但無論我做什麼SPRING_APPLICATION_JSON
在Elastic Beanstalk上部署時都會被忽略。當使用相同的jar在本地進行測試時,它可以工作Spring引導Amazon Elastic Beanstalk忽略'SPRING_APPLICATION_JSON'
export SPRING_APPLICATION_JSON='{"server": { "port": 5000 } }'
java -jar my-app-1.0.1-SNAPSHOT.jar
... snip useless output
2016-07-05 12:18:02.877 INFO 10654 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 5000 (http)
2016-07-05 12:18:02.886 INFO 10654 --- [ main] com.me.app.MyApplication : Started MyApplication in 22.827 seconds (JVM running for 23.514)
當設置在AWS在彈性豆莖同一JSON(罐子版本示出)
但是,當該應用在AWS啓動。該日誌顯示它不是看到了server.port
2016-07-05 15:58:33.511 INFO 2267 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-07-05 15:58:33.520 INFO 2267 --- [ main] com.me.app.MyApplication : Started MyApplication in 37.746 seconds (JVM running for 47.043)
更新的配置值,爲什麼這項工作在本地而不是在彈性魔豆?