我正在尝试将名为abcd且带有工件的应用程序部署为abcd.war。我想配置一个外部数据源。下面是我的abcd.war / META-INF / context.xml文件
<Context>
<ResourceLink global="jdbc/abcdDataSource1" name="jdbc/abcdDataSource1" type="javax.sql.DataSource"/>
<ResourceLink global="jdbc/abcdDataSource2" name="jdbc/abcdDataSource2" type="javax.sql.DataSource"/>
</Context>
我在部署期间配置了以下自定义JSON
{
"datasources": {
"fa": "jdbc/abcdDataSource1",
"fa": "jdbc/abcdDataSource2"
},
"deploy": {
"fa": {
"database": {
"username": "un",
"password": "pass",
"database": "ds1",
"host": "reserved-alpha-db.abcd.us-east-1.rds.amazonaws.com",
"adapter": "mysql"
},
"database": {
"username": "un",
"password": "pass",
"database": "ds2",
"host": "reserved-alpha-db.abcd.us-east-1.rds.amazonaws.com",
"adapter": "mysql"
}
}
}
}
我还在配置阶段添加了配方opsworks_java :: context。但它似乎没有工作,我总是得到如下信息
[2014-01-11T16:12:48 + 00:00] INFO:处理模板[abcd的上下文文件] action create(opsworks_java :: context line 16) [2014-01-11T16:12:48 + 00:00]调试:由于only_if ruby块而跳过模板[abcd的上下文文件]
任何人都可以帮助我解决OpsWorks配置中缺少的内容吗?