ITeye博客

dream1210

dream1210 · 共 29 篇文章

spring bean 配置说明

Spring配置文件的根元素,包含一个或多个bean元素。 default-autowire属性:默认的bean自动装配模式。可选5种模式。 no:不使用自动装配。Bean的引用必须通过ref元素定义。 byName:通过属性名字进行自动装配。 byType:如果BeanFactory中正好有一个同属性类型一样的bean,就自动装配这个属性。如果有多于一个这样的bean,就抛出一个致命异常,它指出你可能不能对那个bean使用byType的自动装配。如果没有匹配的bean,则什么都不会发生,属性不会被设置。如果这是你不想要的情况(什么都不发生),通过设置dependency-check="ob…

2009-07-09 19:32 · Spring学习笔记 · 评论(0)

生成html(5)html模板

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title></title> <link href="/taxmanage/css/style_sjs.cs…

2009-06-02 10:49 · 用程序生成html页面 · 评论(0)

生成html(4)action

/** * 发布 * @preserve */ public ActionForward declare(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { if (log.isDebugEnabled()) { log.debug("Entering 'declare' method"); } SatTaxguide satTaxguide = new SatTaxguide(); satTaxguide.se…

2009-06-02 10:41 · 用程序生成html页面 · 评论(0)

生成html(3)

import java.io.IOException; import java.io.StringWriter; import java.util.List; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; import org.a…

2009-06-02 10:39 · 用程序生成html页面 · 评论(0)

生成html(2)

import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.StringWriter; public class PublishFileWriter { /** * 写文件到磁盘 realpath 生成文件的位置 fileName 生成文件的文件名 * * @param articlecolumn * @param fileContent * @throws IOException * @preserve */ public void writeFile( StringW…

2009-06-02 10:38 · 用程序生成html页面 · 评论(0)

生成html

import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; public class FileReaderUtil { /** * 读文件到String * @param fileName * @return * @throws Exception */ public static String readFile(String fileName) throws Exception { File myFile=new File(fileNam…

2009-06-02 10:36 · 用程序生成html页面 · 评论(0)

数据库优化

一、分析阶段 一般来说,在系统分析阶段往往有太多需要关注的地方,系统各种功能性、可用性、可靠性、安全性需求往往吸引了我们大部分的注意力,但是,我们必须注意,性能是很重要的非功能性需求,必须根据系统的特点确定其实时性需求、响应时间的需求、硬件的配置等。最好能有各种需求的量化的指标。 另一方面,在分析阶段应该根据各种需求区分出系统的类型,大的方面,区分是OLTP(联机事务处理系统)和OLAP(联机分析处理系统)。 二、设计阶段 设计阶段可以说是以后系统性能的关键阶段,在这个阶段,有一个关系到以后几乎所有性能调优的过程—数据库设计。 在数据库设计完成后,可以进行初步的索引设计,好的索引设计可以指导…

2009-06-02 10:24 · 数据库 · 评论(0)

oracle 辅助函数

辅助函数(Miscellaneous Single-Row Functions) 1、DECODE(exp,s1,r1,s2,r2..s,r) 可以把它理解成一个增强型的if else,只不过它并不通过多行语句,而是在一个函数内实现if else的功能。 exp做为初始参数。s做为对比值,相同则返回r,如果s有多个,则持续遍历所有s,直到某个条件为真为止,否则返回默认值def(如果指定了的话),如果没有默认值,并且前面的对比也都没有为真,则返回空。 毫无疑问,decode是个非常重要的函数,在实现行转列等功能时都会用到,需要牢记和熟练使用。 例如: select decode('a2','a…

2009-06-02 10:23 · 数据库 · 评论(0)

推拉门式菜单

<html> <head><style type="text/css"> <!--.link { color : #000000; text-decoration : none; }A.link:hover { color : red; }A.link:active { color : #000000; text-decoration : none; }//--> </style> <style type="text/css"> <!-- #slidemenubar2{position:absolute;left:-110pt;width:120pt;top:100pt;border:1.5…

2009-06-02 10:08 · js学习 · 评论(0)

操作日期的基础类

import java.sql.Timestamp; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; import org.apache.commons.logging.Log; /** * 2005-7-26 14:41:31 */ public class DateUtility { // pri…

2009-06-02 10:04 · java 一些常用基础类 · 评论(0)

SSH项目搭建

1.导入struts、spring、hibernate的jar包。 注意:1.jta.jar不导入会导致Error creating bean with name 'sessionFactory' defined in ServletContext异常 2.asm.jar asm-attrs.jar cglib-2.1.3.jar commons-cllections-2.1.1.jar 包重复也会导致上面的异常 2.建立存放spring、struts配置文件的文件夹,然后再WEB.XML文件中配置他们的路径 <!--②--> <context-param> <param-name>cont…

2009-06-02 09:55 · ssh搭建 · 评论(0)

新增或更新sql

update sat_taxpayer set nsrmc='AAAA' where nsrsbh = '110107751318780' ; insert into sat_taxpayer(remarkid, nsrsbh) select '999', '110107751318780' from dual where ('110107751318780') not in (select nsrsbh from sat_taxpayer );

2009-06-02 09:47 · 评论(0)

excel文件导入

import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.List; import jxl.Sheet; import jxl.Workbook; import jxl.read.biff.BiffException; import org.apache.struts.upload.FormFile; public class NSRImportExcel { /** * e…

2009-06-02 09:45 · 文件上传 · 评论(0)

java文件上传方法

public class UploadUtils { /** * 根据文件路径,上传文件 * @param sourcePath 源文件路径和名字 * @param targetPath 目标文件路径和名字 * @param maxFileSize 文件大小 * @return 布尔值 */ public static boolean uploadFile(String sourcePath, String targetPath, int maxFileSize){ try { InputStream stream = new FileInputStream(sourcePath); Sys…

2009-06-02 09:34 · 文件上传 · 评论(1)

文件下载

/** * 下载文件 */ public ActionForward downLoad(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { String destPathName = servlet.getServletContext().getRealPath("/"); response.reset(); String fileName = request.getParameter("fileName"); …

2009-06-02 09:20 · 文件下载 · 评论(0)