step5
看完了前面的几步,到现在我们必然要想到的问题就是,数据要是放在xml中怎么读?
其实按照正常思维一步一步来,从xml中读数据和之前手工配进去并没有什么大的区别,只要读出来就OK了。
先看测试程序,
public void Step5() throws Exception {
// 1.读取配置
XmlBeanDefinitionReader xmlBeanDefini...
分类:
编程语言 时间:
2014-10-12 15:33:18
阅读次数:
280
图片打水印和缩放:
public final static BufferedImage[] pressImage(InputStream srcImg, String waterImg,float alpha) throws IOException {
//File file = new File(targetImg);
Image image = ...
分类:
其他好文 时间:
2014-10-10 20:16:44
阅读次数:
173
public class Test {public static void main(String[] args) throws Exception {Thread a = new Thread(new A());Thread b = new Thread(new B());Thread c = n...
分类:
编程语言 时间:
2014-10-10 19:50:04
阅读次数:
155
记录一些时间常用操作public class DateCa { public static void main(String[] args) throws ParseException { /** 时间操作首推Calendar 格里高利历 **/ ...
分类:
编程语言 时间:
2014-10-10 00:07:51
阅读次数:
277
原出处是国外某论坛某帖子中楼主提问:如何让1+1=3?于是出现了各种语言实现的各种机制的答案,当然其中也包括直接用字符串输出"1+1=3"...最后被采纳的是用Java语言实现的答案。以下是答案:public static void main(String[] args) throws Illega...
分类:
编程语言 时间:
2014-10-09 21:29:27
阅读次数:
351
public static void main(String[] args) throws ParseException { //random(2); UUID.randomUUID().toString().replaceAll("-", "~~"); System.out.print...
分类:
其他好文 时间:
2014-10-09 13:58:03
阅读次数:
176
public static boolean includingNUM(String str)throws Exception{Pattern p = Pattern.compile("[\u4e00-\u9fa5]*[\\d|\\w]+[\u4e00-\u9fa5]*");//或者 Pattern ...
分类:
编程语言 时间:
2014-10-06 23:11:51
阅读次数:
262
Java的基本输出流类是:java.io.OutputStream: public?abstract?class?OutputStream 这个类提供了写入数据所需的基本方法。这些方法包括: public?abstract?void?write(int?b)?throws?IOException
pub...
分类:
其他好文 时间:
2014-10-06 02:33:09
阅读次数:
172
1Paint() 1 package hello; 2 import java.awt.*; 3 public class helloworld 4 { 5 public static void main(String[] args)throws Exception 6 { 7 ...
分类:
其他好文 时间:
2014-10-05 22:47:39
阅读次数:
287
public static String getString()throws IOException{ InputStreamReader isr = new InoutStreamReader(System,in); ...
分类:
其他好文 时间:
2014-10-04 17:26:16
阅读次数:
178