|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
package au.com.royalpay.payment.manage.system.web;
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.io.IOUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
@ -8,9 +7,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import javax.servlet.ServletInputStream;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@ -18,21 +16,9 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
public class MailCallBackController {
|
|
|
|
|
Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
@RequestMapping(value = "/callback", method = RequestMethod.POST)
|
|
|
|
|
public void contractList(@RequestBody String content, HttpServletRequest req) {
|
|
|
|
|
logger.info("kira"+content);
|
|
|
|
|
logger.info(content);
|
|
|
|
|
|
|
|
|
|
int len = req.getContentLength();
|
|
|
|
|
ServletInputStream iii = null;
|
|
|
|
|
try {
|
|
|
|
|
iii = req.getInputStream();
|
|
|
|
|
byte[] buffer = new byte[len];
|
|
|
|
|
iii.read(buffer, 0, len);
|
|
|
|
|
logger.info("kiratest"+new String(buffer,"UTF-8"));
|
|
|
|
|
IOUtils.closeQuietly(iii);
|
|
|
|
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
public void contractList(@RequestBody Map<String,String> content, HttpServletRequest req) {
|
|
|
|
|
content.values().forEach(p->{
|
|
|
|
|
logger.info("kira"+p);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|