package com.baidu.global.mobile.hao123.nantianmen.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# determine base directory; preserve where you're running from | |
#echo "Path to $(basename $0) is $(readlink -f $0)" | |
realpath=$(readlink -f "$0") | |
filepath=$(dirname "$realpath") | |
basedir=${filepath%/*} | |
LOG_DIR=${basedir}/logs | |
mkdir -p ${LOG_DIR} | |
GC_LOG_DIR=${basedir}/logs/gc | |
mkdir -p ${GC_LOG_DIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
如果你本地工程已经是一个Git Repository(已经执行过[Import an existing, unversioned code project to an empty repository]),那么可以这样把它加入你在Bitbucket创建的远程仓库中: | |
cd /path/to/my/repo | |
# Creates a remote named "origin" pointing at your GitHub/Bitbucket repository (设置远程仓库地址) | |
git remote add origin ssh://git@bitbucket.org/arganzheng/remote-terminator.git | |
# Sends your commits in the "master" branches to GitHub/Bitbucket | |
git push -u origin master | |
当然在你能push之前必须先设置你的账号信息,并且最好使用Password Caching或者SSH key避免每次提交代码都要提示输入密码。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>微生活抽奖模块管理后台</title> | |
<link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> | |
<link href="/static/css/datetimepicker.css" rel="stylesheet" media="screen"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@page import="org.springframework.web.context.WebApplicationContext"%> | |
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%> | |
<%@page import="org.springframework.web.context.support.XmlWebApplicationContext"%> | |
<% | |
XmlWebApplicationContext context = (XmlWebApplicationContext)WebApplicationContextUtils.getWebApplicationContext(application); | |
try{ | |
if(!context.isActive()){ | |
context.refresh(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.arganzheng.study; | |
import java.io.IOException; | |
import java.io.PrintStream; | |
import org.codehaus.jackson.map.ObjectMapper; | |
import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; | |
import org.springframework.http.HttpOutputMessage; | |
import org.springframework.http.converter.HttpMessageNotWritableException; | |
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; |
log4j.logger.java.sql.PreparedStatement=debug
log4j.logger.java.sql.Connection=debug
将打印出Connection和Statement信息:
[DEBUG] 11:48:17 Connection - {conn-100000} Connection
[DEBUG] 11:48:17 Connection - {conn-100000} Preparing Statement: select api.id from t_api_metadata_api api, t_api_metadata_module module where api.module_id=module.id and api.source = ? and api.name = ? and api.module_id = ? and module.name = ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.arganzheng.study.metadata.dao; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.util.List; | |
import javax.xml.bind.JAXBContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Repository | |
public class ApiDao extends SqlMapClientDaoSupport { | |
// empty constructor | |
public ApiDao() { | |
} | |
// autowired constructor | |
// i dont know why, but i cant autowired sqlMapClient directly | |
// it will cause java.lang.IllegalArgumentException: Property 'sqlMapClient' is required |
OlderNewer