-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jrebel修改后调用toString方法报错问题 #2231
Comments
这是因为fastjson对序列化器做了缓存,你参数改变后它还是调用之前的序列化器 |
能够禁用缓存达到刷新的效果吗? |
可以的,方法如下: @RestController
@RequestMapping("/api")
public class SystemController {
@ApiOperation(value = "开发时清除缓存", notes = "用于开发使用JRebel时清除FastJson的对象解析Cache")
@RequestMapping(value = "/clearCache", method = RequestMethod.GET)
public String clearCache() {
SerializeConfig.getGlobalInstance().clearSerializers();
ParserConfig.getGlobalInstance().clearDeserializers();
return "";
}
} 调用该方法即可清除缓存。 |
有没有大神写一个拦截器,,这样每次调接口清除好麻烦呀 |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
通过AOP拦截方法参数,在参数增加字段以及get,set后,增加的参数是List集合,调用JSON.toString方法会报找不到get方法。
目前有解决办法吗?
The text was updated successfully, but these errors were encountered: