zhaoshunxin的博客
zhaoshunxin · 共 23 篇文章
spring-ws
package org.upyaya.sample.echo.client; import java.io.FileNotFoundException; import java.io.IOException; import javax.xml.soap.Name; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPHeader; import javax.xml.soap.SO…
2012-07-16 20:10 · Spring · 评论(0)
Oracle数据分区
--范围分区 --范围分区就是对数据表中的某个值的范围进行分区,根据某个值的范围,决定将该数据存储在哪个分区上。如根据序号分区,根据业务记录的创建日期进行分区等 create table SUBAREA ( PID number not null, PITEM varchar2(200), PDATA date not null ) partition by range(PID) ( partition part_01 values less than(100000), partition part_02 values less than(200000), partition part_03…
2012-06-29 10:16 · 数据库 · 评论(0)
Servlet线程问题
Servelt/jsp默认是以多线程模式执行,在编码时需要考虑其多线程安全性。 Servlet体系结构建立在java多线程机制上,生命周期由web容器负责。当客户端第一次请求某个Servlet时,Servlet容器会根据web .xml配置实例化这个Servlet类,当有新的客户端请求该Servlet 时,一般不会再实例化该Servlet 类,也就是有多个线程在使用这个实例。 当多个线程访问同一个Servlet时,可能会发生多线程访问同意资源,可能会变的答非所问。 Servlet状态形式 1、无状态Servlet: 因为线程访问无状态对象的行为,不会影响其它线程访问对象时的正确性,所以无状态…
2012-06-19 11:24 · JAVA · 评论(0)
Spring 采用ObServer设计模式实现事件传递
Spring 采用ObServer设置模式实现事件传递 定义自己的事件 1、实现ApplicationListener 创建事件监听 public class EventListener implements ApplicationListener { private String to; public void setTo(String to) { this.to = to; } public void onApplicationEvent(ApplicationEvent event) { if (event instanceof ObServerEvent) { ObServerEve…
2012-06-14 17:09 · Spring · 评论(0)
spring + hibernate
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns=" http://www.springframework.org/schema/beans " xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance " xmlns:p=" http://www.springframework.org/schema/p " xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework…
ORACLE 导入导出
oracle 数据库导入导出 exp user/pwd file=expfile.dmp imp user1/pwd fromuser=user touser=user1 ignore=y file=*.dmp 数据库备份方式 1、物理备份,可实现数据库的完整恢复 2、逻辑备份:表备份、用户备份和完全备份 表 exp user/pwd rows=y indexes=y compress=n file=*.dmp log=*.log tables=employee,employee2 备份完整模式 exp user1/pwd rows=y indexes=y compress=n file=*…
2012-06-08 11:40 · 数据库 · 评论(0)
Map迭代效率
Map迭代方式比较 Bug: XXX makes inefficient use of keySet iterator instead of entrySet iterator Pattern id: WMI_WRONG_MAP_ITERATOR, type: WMI, category: PERFORMANCE This method accesses the value of a Map entry, using a key that was retrieved from a keySet iterator. It is more efficient to use an iterator…
2011-12-21 17:56 · JAVA · 评论(1)
cmd项目文件提取打包
@echo off rem 执行格式:项目文件处理.bat 项目路径 压缩文件名 rem 设置文件路径及压缩文件名 set nowdate=%date:~0,10% rem 项目路径 set sourceFilePath=%1 rem 压缩文件名,一般为项目名称 set fileName=%2 rem 存放目录,项目名称下按日期分类 set targetFilePath=f:\%fileName%\%nowdate% rem copy file. if not exist %sourceFilePath% ( @echo 源文件路径不存在,退出 goto exit ) if not exis…
2011-12-21 17:04 · JAVA · 评论(0)
LINUX 引号
引号 1、引用的必要性。 2、双引、单引和反引号。 3、使用反斜线实现屏蔽。 引用类型 1、" " 双引号, 2、` 反引号, 3、' ' 单引号, 4、 \ 反斜线 例子: 双引号:使用双引号可引用除字符$、`、\外的任意字符或字符串 echo sdfdsfsd * fsdfsdf 如果不加引号,linux就会将命令行解释为 显示目录列表 echo "date" read myword 12345 echo $myword echo "$myword" 单引号:与双引号类似,不同的是s h e l l会忽略任何引用值 echo '*' read myword 12345 echo $myw…
2011-12-08 11:43 · Linux · 评论(0)
Linux 判断&循环体
if elseif else 判断 mytar.sh #!/bin/sh #操作命令后都要添加空格,对 [] 中添加conditions 也要添加空格 #!/bin/sh if [ -z "${1}" ]; then echo "no file" elif [ "${1##*.}" = "tar" ]; then echo "this is a tar file" elif [ "${1##*.}" = "gz" ]; then echo "this is not a gz file" else echo "other file" fi //执行 ./mytar.sh a.tar myvar…
2011-11-22 21:31 · Linux · 评论(0)
Linux find命令
find [path] [参数] [keyword] //查找文件 find pathname -options [-print -exec或-ok] find . -name //根据名称查找 find . -name *.log -exec rm -r {} \; //查找类型为log的文件,并将其删除 find . -name *.log -exec ls -l {} \; //查找类型为log的文件,并将列出详细信息 find . -name *.log -ok rm -r {} \; //exec 的安全模式 提示用户是否删除 如果用户输入y则删除 n不删除 find . -typ…
2011-11-15 18:46 · Linux · 评论(0)
Linux 文件授权
//文件权限的设置 中间没有空格 格式:chmod [who]operator[permission] file who: u 文件属主权限 g 同组用户权限 o 其他用户权限 a 所有用户 operator + 增加权限 - 取消权限 = 设置权限 permission //字母表示法 r 读 w 写 x 执行 l 加锁 permission //数字表示法 r-4 2-w x-1 权限位置上 每一个最大的值为7 最小0(没有任何权限) 例子: chmod u+x myfile // 给所属用户添加执行权限 chmod u-x myfile // 取消所属用户的执行权限 chmod u-x…
2011-11-15 18:46 · Linux · 评论(0)