如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
Java语言之SPRINGSpring及java基础的一些常识Spring框架由七个模块组成代码编写的结构:调用者和被调用者的关系1.传统的写法(紧耦合)packagecom.test;importcom.print.Printer;publicclassTest{publicTest(){}/***@paramargs*/publicstaticvoidmain(String[]args){//调用者Printerprinter=newPrinter();//被调用者printer.print();}}2.通过读取配置文件建立关系举个例子建立oracle数据库连接时,DriverManager.getConnection(url,user,password);如:url=“localhost”;user=“scott”;password=“tiger”;//hardcode写一个db.properties文件其内容为:url=localhostuser=scottpassword=tiger好处:以后换了主机只要改一下配置文件就行,程序不动(松耦合)和spring见个面准备:ApplicationContextFileSystemXmlApplicationContextapplicationContext.xmlSpring文档.chm或myeclipse安装反编译软件(jadclipse)微软公司的WindowsXP内,显然有USB接口的驱动程序,USB接口可以很好地接受打印机,u盘或者移动硬盘的接入,你如果是WindowsXP的开发人员,应该怎么样开发这个程序?注意:程序里面只有两个功能:read(),write()方案1:在XP里面将所有可能的硬件驱动程序都开发一遍方案2:在XP里面不开发驱动程序,在硬件接入的时候安装这个驱动程序总结一下:通过WebApplicationContextWebApplicationContext是ApplicationContext的子接口(1)建立一个Web项目,在web.xml中加入:<servlet><servlet-name>context</servlet-name><servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class><load-on-startup>1</load-on-startup></servlet>这样,系统自动读取/WEB-INF/applicationContext.xml,如果自己定义文件名,则还需要增加:<context-param><param-name>contextConfigLocation</param-name><param-value>/WEB-INF/文件路径</param-value></context-param>通过WebApplicationContextUtils.getWebApplicationContext(application)得到Beanpprrceosa飘飘然然ceo阿sapagepageContextrequestresponeconfigexceptionoutsessionapplication<beanid=“对象名”class=“类名”singleton=“是否单例(getBean方法时是否新实例化一个对象)“init-method=”初始化方法名“destroy-method=“bean被销毁时调用的方法名"><propertyname=“属性名"><value>值</value></property><propertyname=“属性名"><null/></property><propertyname=“名”><reflocal=“另一个Bean属性的id,在这里作为属性值传入”/></property></bean>LocalidBeanname软件开发流程