Pretty Code

此篇博文用来记录看到比较漂亮又用的code,以备以后查阅复习

1

private static final List<String> escapeActionList = Arrays.asList(new String[] { "/logon.action", "/signin.action","/authenticate.action", "/logout.action","/sendCustomerInformation.action" });

 

2

BeanUtils bu = new BeanUtils();
bu.copyProperties(categ, cat);

 http://www.cnblogs.com/bjzhanghao/archive/2004/07/30/28607.html

http://www.open-open.com/lib/view/open1337223199822.html

3

String s = "image/pjpeg;image/gif;image/jpeg;image/jpg;image/png;image/tiff;image/x-png";
		StringTokenizer st = new StringTokenizer(s, ";");
		while(st.hasMoreTokens()){
			System.out.println(st.nextToken());
		}

 

你可能感兴趣的:(code)