`
xly1981
  • 浏览: 142718 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论
文章列表

获取.properties文件

    博客分类:
  • java
在classes文件夹下放MPI.properties文件,下面方式可取得配置内容 public class MPIProperties { private static final String BUNDLE_NAME = "MPI"; private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle .getBundle(BUNDLE_NAME); private MPIProperties() { } /** * 从MPI属性文件中取得键的值 * ...
获取绝对路径 Thread.currentThread().getContextClassLoader().getResource("").getPath(); 获取相对路径 StringBuffer 与 StringBuilder 中的方法和功能完全是等价的,只是 StringBuffer 中的方法大都采用了 synchronized 关键字进行修饰,因 此是线程安全的,而 StringBuilder 没有这个修饰,可以被认为是线程 不安全的。 StringBuffer 始于 JDK 1.0 StringBuilder 始于 JDK 1.5 从 JD ...
private   Component   visualComponent; //代码片断 public   void   controllerUpdate(ControllerEvent   e){ ..... lse   if   (e   instanceof   RealizeCompleteEvent) { //   player.getVisualComponent()是一个播放所有视频媒体的可视组件。 visualComponent   =   player.getVisualComponent(); if   (visualComponent   !=   nu ...
项目需要做一个shell程序,用来查找指定日志文件中某段字符串str,再根据该字符串str所在的行,找到对应的某个字段str1($*)再以此str1找出str上下若干包含str1的行,主要内容用awk实现,还用到了getopts进行参数的判断: #!/bin/bash # File: Fmsg.sh # Author: xiaoleyu@gmail.com # Update: 2008-07-30 while getopts  "m:k:l:f:" flag do     case $flag in         m) MSG=$OPTARG #各个参数后面的值都保存在O ...
public class SysParaWrapper extends Decorator{ public String getEdit(){ SysInfoForm sf=(SysInfoForm)getCurrentRowObject(); String name=sf.getParaName(); String value=sf.getParaValue(); String dsc=sf.getParaDsc(); return "<a href=\""+sf.getContextPath()+"/sysInfoPro ...
http://www.blogjava.net/tthappy/archive/2008/02/19/99447.html http://cid-db3c356301da9a87.spaces.live.com/Blog/cns!DB3C356301DA9A87!138.entry 配置参考以上网址 http://confluence.atlassian.com/display/JIRAEXT/JIRA+Subversion+plugin#JIRASubversionplugin-versions SVN效果参考以上网址 先安装好JIRA和SVN软件,配置好新的SVN库和用户名密码 2 ...
JIRA版本3.12.2,SVN版本1.4.5,mysql5.0,myeclipse7.0 1.下载mylyn包,地址 http://www.eclipse.org/mylyn/downloads/ 放入C盘下Mylyn文件夹,mylyn-3.3.0-e3.4.zip 解压到c:\Mylyn 下,文件夹内有 plugin和feature文件夹 下载mylyn的download.eclipse.org/tools/mylyn/update/extras和download.eclipse .org/tools/mylyn/update/incubator 包 参考:http://www.eas ...
环境说明: 1.页面编码配置:<%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%> 2.tomcat 的conf/server.xml中加了 <Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="2 ...
http://www.iteye.com/topic/204596 myeclipse+weblogic10的配置,配置成功 运行中可能失败,由于weblogic10不稳定,重启机器后可以使用了 web工程使用到hibernate3时可能出现问题 ClassNotFoundException: org.hibernate.hql.ast.HqlToken 参考http://blog.chinajavaworld.com/entry.jspa?id=829 把本地的antlr.jar包考到weblogic.jar所在目录,在myeclipse配置服务器的path选项中添加这个antlr.ja ...
同样的批处理程序,目标表的Key发生变化,导致目标表内的数据和原本的数据不一致
工程中存在报错a different object with the same identifier value was already associated with the session 研究过程中发现 1.保存对象失败 2.事务没有回滚 源码: equipmentDao.delGroupInfoDtls(delList);//成功执行 equipmentDao.saveGroupInfoDtlList(addList);//执行失败,不确定异常是否和a different object with the same identifier value was already associ ...
http://blog.chinaunix.net/u/3641/showart_506402.html Xfire实现WSS之创建密钥对和数字证书 签名和加密需要使用到数字证书和密钥对,可以使用JDK提供的KeyTool工具创建密钥对和数字证书。我们分别为服务端和客户端创建RSA密钥对,并生成各自的数字证书(包含公钥和数字签名)。服务端和客户端拥有各自的密钥库JKS文件,服务端的密钥库保存服务端的密钥对和客户端的数字证书,而客户端的密钥库保存客户端的密钥对和服务端的数字证书。 #keystore的生成: keytool -genkey -alias password654321 -ke ...
用于发送https请求,不需要对服务器的CA认证 http://hc.apache.org/httpcomponents-client/tutorial/html/connmgmt.html#d4e470 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection;// import java.security.cert.CertificateException;// import java.secur ...
以如下方式配置,日志文件sendFilter-log.txt会放在tomcat的bin目录下 <?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">       <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/' >     <appender name="CONSOLE ...
http://stackoverflow.com/questions/1617042/java-lang-nosuchmethoderror-org-apache-http-protocol-basichttpcontext-method-i HttpClient 4,可以使用HttpCore4.1(还是alpha版)的包,避免出现上面的问题。 http://sanyuesan3.taobao.com/
Global site tag (gtag.js) - Google Analytics