貌似MarsEdit不能直接支持源代码的高亮,和博客园两个之间,需要一点小小的配合。
#!/bin/bash echo $PATH
#!/bin/bash echo $PATH
下面测试一个简短的Java代码的高亮
public class Test{ public static void main(String[] args){ System.out.println(“Hello World!”); } }
简单来说,就是利用MarsEdit的Macro宏来完成的
public void notify(HttpServletRequest request, HttpServletResponse response) { try { request.setCharacterEncoding(QuickPayConf.charset); } catch (UnsupportedEncodingException e) { log.error("不支持的编码方式", e); } System.out.println("=============这里是notify方法的输出开始================"); Enumeration names = request.getParameterNames(); while (names.hasMoreElements()) { String name = names.nextElement(); System.out.println("参数:" + name + " , 参数值:" + request.getParameter(name)); } System.out.println("=============这里是notify方法的输出结束================"); String[] resArr = new String[QuickPayConf.notifyVo.length]; for (int i = 0; i < QuickPayConf.notifyVo.length; i++) { resArr[i] = request.getParameter(QuickPayConf.notifyVo[i]); } String signature = request.getParameter(QuickPayConf.signature); String signMethod = request.getParameter(QuickPayConf.signMethod); boolean signatureCheck = new QuickPayUtils().checkSign(resArr, signMethod, signature), paySuccess = "00".equals(resArr[10]); System.out.println("签名:" + signatureCheck + " , 支付:" + paySuccess); if (!paySuccess) { System.out.println(resArr[11]); } }