我正在尝试将以下JSON输入发送到elasticsearch,但我正在获取解析器错误.
这是JSON输入
{
"chassisNumber": "654321",
"position": "40.480143, -3.688960",
"issue": "Position",
"timestamp": "2016-07-15T15:29:50+02:00[Europe/Paris]"
}
Run Code Online (Sandbox Code Playgroud)
索引定义
{
"mappings":{
"vehicle":{
"properties":{
"vehicle":{
"type":"string"
},
"position":{
"type": "geo_point"
},
"issue":{
"type":"string"
},
"timestamp":{
"type":"date",
"format":"YYYY-MM-DD'T'HH:mm:ssZ"
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
以及与"timestamp"字段相关的错误.
"reason": "Invalid format: \"2016-07-15T15:29:50+02:00[Europe/Paris]\" is malformed at \"[Europe/Paris]\""
Run Code Online (Sandbox Code Playgroud)
我尝试了一些日期格式,但没有人成功.任何人都可以帮我定义正确的格式来解析elasticsearch中的"timestamp"字段吗?
谢谢!!!
我需要在weblogic环境中定义一些属性,以便在启动过程中用于应用程序.我将属性直接放在文件setDomainEnv中,但应用程序没有使用此行获取属性:
public static final String SYSVAR_ENVIROMENT = System
.getProperty(Constants.ENVIROMENT);
Run Code Online (Sandbox Code Playgroud)
我不确定我是否正确宣布了这个属性,有人可以帮助我吗?在其他应用程序服务器中,这种类型的属性可以由Web控制台设置,但我在weblogic中没有找到这种方式.