简体   繁体   中英

Cache JSON string response from Spring RestController

是否可以缓存Spring RestController的JSON字符串,而不是缓存返回的Java对象?

Sure, you could write an interceptor to trap all requests and use 1 of the techniques described here to convert request into a String. Caching can be done using a hash map with key as session id and URL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM