将Java Spring应用部署到heroku时,json时区指示器“”无效
我正在尝试向Heroku部署一个Java Spring应用程序,它在我的本地机器上运行良好。但当我将其推送到heroku服务器时,它会抛出以下异常:
java.lang.IndexOutOfBoundsException: Invalid time zone indicator ' '
在这行代码中:
Gson gson = new Gson();
PricingSample[] samples = gson.fromJson(string, PricingSample[].class);
我猜,从我读到的,必须有某种适配器添加,但我不知道如何添加一个适合这里。通常,当时区指示器无效时,它会显示错误的字符串
编辑:
我刚刚注意到,浏览器显示的消息提供了有关试图解析的字符串的更多信息:
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sun Jun 03 08:40:41 UTC 2018 There was an unexpected error (type=Internal Server Error, status=500). For input string: "2018-06-03 07:00:00"
共 (0) 个答案