| | |
| | | |
| | | @Override |
| | | public Object beforeBodyWrite(Object o, MethodParameter methodParameter, MediaType mediaType, Class aClass, ServerHttpRequest serverHttpRequest, ServerHttpResponse serverHttpResponse) { |
| | | if (!AppContants.ENCRYPT_METHOD.contains(methodParameter.getMethod().getName())) { |
| | | String name = methodParameter.getMethod().getName(); |
| | | if("findPlatformBannerList".equals(name)){ |
| | | return o; |
| | | } |
| | | if("newsDetails".equals(name)){ |
| | | return o; |
| | | } |
| | | if("findNews".equals(name)){ |
| | | return o; |
| | | } |
| | | if("findNewsInPage".equals(name)){ |
| | | return o; |
| | | } |
| | | if("findNewsInfoCategory".equals(name)){ |
| | | return o; |
| | | } |
| | | if (!AppContants.ENCRYPT_METHOD.contains(name)) { |
| | | return o; |
| | | } |
| | | |
| | | return SecureUtil.rsa(AppContants.REQ_PRIVATE_KEY, AppContants.REQ_PUBLIC_KEY).encryptBase64(JSONObject.toJSONString(o), KeyType.PrivateKey); |
| | | return SecureUtil.rsa(AppContants.REQ_PRIVATE_KEY, AppContants.REQ_PUBLIC_KEY) |
| | | .encryptBase64(JSONObject.toJSONString(o), KeyType.PublicKey); |
| | | } |
| | | } |