2013年3月26日

Hello Spring(5)ApplicationContext

摘要: Tester.java 1 package test; 2 3 import org.springframework.context.ApplicationContext; 4 import org.springframework.context.support.ClassPathXmlApplicationContext; 5 import user.Dao; 6 7 public class Tester { 8 9 public static void main( String[] args){10 11 /*Resource r =... 阅读全文

posted @ 2013-03-26 17:08 Livon 阅读(184) 评论(0) 推荐(0) 编辑

Hello Spring(4)Dao

摘要: 文件结构user.Bean.java 1 package user; 2 3 public class Bean { 4 5 private String name; 6 private String passwork; 7 8 public String getName() { 9 return name;10 }11 public void setName(String name) {12 this.name = name;13 }14 public String getPassw... 阅读全文

posted @ 2013-03-26 16:28 Livon 阅读(294) 评论(0) 推荐(0) 编辑

Hello Spring(3)ConnectionUtility

摘要: ConnectionUtility.java 1 package test; 2 3 import java.sql.Connection; 4 import java.sql.DriverManager; 5 6 public class ConnectionUtility { 7 8 private String userName; 9 private String password;10 private String dbUrl;11 private String dbDriver;12 13 public Connectio... 阅读全文

posted @ 2013-03-26 15:50 Livon 阅读(202) 评论(0) 推荐(0) 编辑

Hello Spring(2)Computer with Usb interface

摘要: 目录结构 files structure新建一接口new InterfaceUsb.java1 package test;2 3 public interface Usb {4 5 public void read();6 public void write();7 8 }Udisk.java 1 package test; 2 3 public class Udisk implements Usb { 4 5 @Override 6 public void read() { 7 // TODO Auto-generated meth... 阅读全文

posted @ 2013-03-26 15:09 Livon 阅读(269) 评论(0) 推荐(0) 编辑

Hello Spring(1)代替属性文件

摘要: 文件结构:files structureHelloSpring.java (1) 1 package test; 2 3 public class HelloSpring { 4 5 private String name; 6 7 public String getName() { 8 return name; 9 }10 11 public void setName(String name) {12 this.name = name;13 }14 15 public String hell... 阅读全文

posted @ 2013-03-26 14:20 Livon 阅读(171) 评论(0) 推荐(0) 编辑

Spring 实战

摘要: 下载:http://www.springsource.org/spring-frameworkhttp://www.springsource.org/download/community解压:C:\Livon\Java\Tools\Spring\spring-framework-3.2.2.RELEASE-dist\spring-framework-3.2.2.RELEASE\libsHelloWorld.javabeans.xml参考:http://topinking.iteye.com/blog/239821 1 <?xml version="1.0" encod 阅读全文

posted @ 2013-03-26 10:37 Livon 阅读(230) 评论(0) 推荐(0) 编辑

导航