这个错误还真难搞,头一次遇见还真没有什么好办法解决,上网找了很多资料,一一试过也不能很好的解决,最后经过朋友,同事一起努力,终于征服了.留下笔记,供大家参考:
1.我后台测试代码如下:
@RequestMapping("/json")
public @ResponseBody
String json() {
return "this is json";
}
@RequestMa...
分类:
编程语言 时间:
2015-01-22 11:10:17
阅读次数:
234
在ZKUtil.java中: public static RecoverableZooKeeper connect(Configuration conf, String ensemble, Watcher watcher, final String identifier) throws ...
分类:
其他好文 时间:
2015-01-22 10:52:08
阅读次数:
110
1,.error接口的定义
type error interface{ Error() string}
2.error的使用
func Foo(param int)(n int,err error){ //函数定义}n,err:=Foo(0)if err!=nil{ //错误处理}else{ //使...
分类:
其他好文 时间:
2015-01-22 10:49:34
阅读次数:
135
1、string var string = "this is mine" string.substring(); //截取函数 string.toLowerCase(); //换换小写 string.toUpperCase(); //转换大写 string.indexOf("is")...
分类:
Web程序 时间:
2015-01-22 10:48:26
阅读次数:
279
protected void GetHtml() { string url = "http://www.baidu.com/"; HttpWebRequest wRequest = (HttpWebRequest)WebRequest.Create(url); //设置请求...
分类:
Web程序 时间:
2015-01-22 10:44:50
阅读次数:
234
方法一:/// /// 去除HTML标记 /// /// 包括HTML的源码 /// 已经去除后的文字 public static string NoHTML(string Htmlstring) { //删除脚本 Htmlstring = Regex.Replace(Htmlstring,@...
分类:
Web程序 时间:
2015-01-22 10:44:16
阅读次数:
198
//大数取模
#include "cmath"
#include "iostream"
#include "string.h"
using namespace std;
int mod(char str[],int num)
{
int number[100];
for(int i=0;i<strlen(str);i++)
number[i]=str[i]-'0';
...
分类:
其他好文 时间:
2015-01-22 01:49:12
阅读次数:
277
Java SE 7 在日常编程中对一些内容进行了优化
具体有以下几种
1、switch 语句中支持字符串String
如:switch(“a")
2、更好的整型字符串
3、泛型改进类型推断
4、优化了异常处理
5、简化了可变参数方法调用
我这次主要说的是优化的异常处理具体内容是:多重捕获、重新抛异常和try -with -resources。
1、多重捕获异常
...
分类:
编程语言 时间:
2015-01-22 00:22:20
阅读次数:
225
public class TestCase
{ static String ab = "ab"; static String getA() { return "a"; } static String getAB() { return "ab"; } public static void main(S...
分类:
编程语言 时间:
2015-01-22 00:12:52
阅读次数:
256