| Modifiers | Name | Description |
|---|---|---|
static class |
WeatherUtils.AmapApi |
高德开放平台接口 |
| Modifiers | Name | Description |
|---|---|---|
static Map |
AQI_DESC |
|
static String |
AQI_DESC_JSON |
|
static Map |
WEATHERS_ICONS |
|
static String |
WEATHERS_ICONS_JSON |
| Type | Name and description |
|---|---|
static void |
cacheLocation(String api, javax.servlet.http.HttpServletRequest request, String location)缓存用户所在的位置 |
static void |
cacheWeather(String api, String location, String weather, Date expiryTime)根据位置缓存天气 |
static String |
getCachedLocation(String api, javax.servlet.http.HttpServletRequest request)从缓存中获取用户所在位置 |
static String |
getCachedWeather(String api, String location)从缓存中获取位置的天气 |
| Methods inherited from class | Name |
|---|---|
class Object |
Object#wait(long, int), Object#wait(long), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |
缓存用户所在的位置
location - 位置信息,由 api 接口的实现方式决定,这里只是提供缓存框架根据位置缓存天气
location - 位置信息,由 api 接口的实现方式决定,这里只是提供缓存框架weather - 天气信息,由 api 接口的实现方式决定,这里只是提供缓存框架expiryTime - 缓存失效时间从缓存中获取用户所在位置
从缓存中获取位置的天气