- 浏览: 224554 次
- 性别:
- 来自: 杭州
最新评论
-
sblig:
配置分片: mongo -port 27017config ...
搭建Mongodb集群:分片Sharding+副本集Replica Set -
sblig:
配置路由:mongs: 40000 40100 40200sc ...
搭建Mongodb集群:分片Sharding+副本集Replica Set -
fuanyu:
哥们,干得漂亮。。
struts2 高危漏洞修复 -
sblig:
配置列子如下
<?xml version="1 ...
跟我学Spring3 学习笔记一 -
sblig:
307622798 写道博主你好,最近在看你的js系列文章,发 ...
JavaScript 学习笔记 二 对象的访问
文章列表
public void dorun(){
//构造一个线程池
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(5, 10, 3,
TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(10),
new ThreadPoolExecutor.CallerRunsPolicy());
for (int i = 1; i <= sheet.getLastRowNum(); i++)
{
threadPoo ...
跟我学Spring3 学习笔记五 注入
- 博客分类:
- java
跟我学Spring3 学习笔记一
跟我学Spring3 学习笔记二
跟我学Spring3 学习笔记三
跟我学Spring3 学习笔记四
常量注入:
<!-- 常量注入 -->
<bean id="AfxMessage" class="java.lang.String">
<constructor-arg index="0" value="Hello Spring by id" />
</bean>
<bean id=& ...
dos 命令行 获取5位随机数
- 博客分类:
- dos
@echo off
set .=%random%
set "d=%.%%.%"
set d=%d:~-5%
echo %d%>>b.txt
/**
* setter注入 添加set get 方法
*/
public class HelloImplConstr implements HelloApi {
private String message;
private int index;
// 空的构造器一定要有
public HelloImplConstr(){
}
@ConstructorProperties({"message","index"})
public HelloImplConstr(String m ...
构造器注入法:
/**
* 构造器注入可以根据参数索引注入、参数类型注入或Spring3支持的参数名注入,
* 但参数名注入是有限制的,需要使用在编译程序时打开调试模式
* (即在编译时使用“javac –g:vars”在class文件中 ...
//静态工厂方法
public class HelloApiStaticFactory {
public static HelloApi newInstance(String msg){
//返回需要的Bean实例
return new HelloImpl(msg);
}
}
<!-- 静态工厂方法 -->
<bean id="helloFactory" class="com.HelloApiStaticFactory"
factory-method="newInstance" ...
public interface HelloApi {
public void sayHello();
}
public class HelloImpl implements HelloApi{
public void sayHello() {
System.out.println("Hello World ! ");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="ht ...
public class ParseViewIPTag extends TagSupport{
@Override
public int doStartTag() throws JspException {
HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();
JspWriter out = this.pageContext.getOut();
String ip = request.getRemoteAddr();
try {
...
oscache 缓存
- 博客分类:
- java
数据库查询结果缓存
//缓存对象
private static GeneralCacheAdministrator admin = new GeneralCacheAdministrator();
/* 刷新缓存的间隔,单位为秒,此处设置为 10 秒 */
int myRefreshPeriod = 10;
//标识是否更新缓存
boolean update = false;
try {
/* 从 Map 中取出键值为 key 的对象,返回一个Object 对象,需要强制转换 */
list = (List<Users>) admin.getFromCa ...
public class HibernateSessionFactory {
/**
* Location of hibernate.cfg.xml file.
* Location should be on the classpath as Hibernate uses
* #resourceAsStream style lookup for its configuration file.
* The default classpath location of the hibernate config file is ...
<span><p>
<HEADER>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</HEADER>
<span><p>
请求服务<FORM method="post" action="http://10.106.22.241:8089/service/dovider.action">
<TEXTAREA ...
遨游浏览器 RSS阅读器
- 博客分类:
- RSS
<opml version="1.0"><head><title>Maxthon Reader Export Data</title></head><body><outline type="rss" text="http://blog.csdn.net/rss.html?type=Home&channel=" title="http://blog.csdn.net/rss.html?type=Home&channel= ...
public class OperSysProperty {
//属性文件的路径
static String profilepath="syscfg.properties";
static String Object = "object";
private static Properties props = new Properties();
private static Properties proNum = new Properties();
static {
try {
...
// 处理钩子的对象
var hook = (function () {
return {
timer:null,
init:function () {
this.callHooks('init');
},
callHooks:function (init) {
var s = "hook_" + init + '_event',
...
ExtJs 学习笔记 一 初体验
- 博客分类:
- ExtJs
<link rel="stylesheet" type="text/css" href="ext-2.2/resources/css/ext-all.css" />
<script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext ...