| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.buwan.util.EHCacheManager; |
| | | import com.yeshi.buwan.util.JsonUtil; |
| | | import com.yeshi.buwan.util.StringUtil; |
| | | import com.yeshi.buwan.util.SystemUtil; |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | |
| | | public class ConfigController { |
| | | @Resource |
| | | private ConfigService configService; |
| | | |
| | | @Resource |
| | | private EHCacheManager ehCacheManager; |
| | | |
| | | @RequestMapping("configList") |
| | | public void configList(PrintWriter out) { |
| | |
| | | return; |
| | | } |
| | | |
| | | /** |
| | | * 清除缓存 |
| | | * |
| | | * @param cache |
| | | * @param out |
| | | */ |
| | | @RequestMapping(value = "clearCache", method = RequestMethod.POST) |
| | | public void clearCache(String cache, PrintWriter out) { |
| | | //清除全部缓存 |
| | | if (StringUtil.isNullOrEmpty(cache)) { |
| | | ehCacheManager.removeAllCache(); |
| | | } else { |
| | | ehCacheManager.clearCacheByCacheName(cache); |
| | | } |
| | | out.print(JsonUtil.loadTrueAdmin("")); |
| | | return; |
| | | } |
| | | |
| | | } |