- 浏览: 345435 次
- 性别:
- 来自: 南京
最新评论
-
wajjj:
[flash=200,200][url][img][list] ...
【JAVA】读取excel内容(兼容03和07格式) -
xurichusheng:
jjhe369 写道感谢分享!但是发现一个小问题,就是第13, ...
oracle 存储过程分页查询 -
jjhe369:
感谢分享!但是发现一个小问题,就是第13,14行的V_STAR ...
oracle 存储过程分页查询 -
飞天奔月:
为什么不用 Map<String, String> ...
读取.properties的内容,并将内容放入一个Map中 -
xurichusheng:
814687491 写道测试了一下,无法换行!你可以自定义自己 ...
使用google的zxing制作二维码
文章列表
BaseDAOImpl<T>.java
public class BaseDAOImpl<T> implements IBaseDAO {
// private JdbcTemplate jdbcTemplate;
private SqlMapClientTemplate sqlMapClientTemplate;
public void setSqlMapClientTemplate(
SqlMapClientTemplate sqlMapClientTemplate) {
this.sqlMapClient ...
UserEntity.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap
PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap namespace="user">
<r ...
1、applicationContext-service.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx" ...
1、applicationContext.xml
<bean id="sqlMapClient"
class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="configLocation" value="classpath:sqlMapConfig.xml"/>
<property name="dataSource" ref=& ...
### mysql ###
driverClassName=com.mysql.jdbc.Driver
username=root
password=root
url=jdbc:mysql://localhost:3306/test
### oracle ###
#driverClassName=oracle.jdbc.driver.OracleDriver
#username=scott
#password=tiger
#url=jdbc:oracle:thin:@localhost:1521:orcl
## start use org.apache.comm ...
事务的处理在service层。
<!-- - - - - - - spring Transaction Manager - - - - - - - -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" ...
<!-- 数据库连接配置文件 -->
<bean id="configBean"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:jdbc.properties" />
</bean>
<bean id="dat ...
applicationContext.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/ ...
/**
* @Title: writeFile
* @Description: 写文件
* @param @param srcPath : 源文件路径
* @param @param targetPath : 目标文件路径
* @return void 返回类型
*/
public static void writeFile(String srcPath, String targetPath){
File srcFile = new File(srcPath);
File targetFile = new File(targe ...
//去掉前后空格
function trim(str)
{
if(str==null)
return "";
//如果str前存在空格
while(str.charAt(0)==' '){
str = str.substring(1,str.length);
}
//如果str末尾存在空格
while(str.charAt(str.length-1)==' '){
str = str.substring(0,str.length-1);
}
re ...
<HTML>
<HEAD>
<TITLE>test</TITLE>
<meta http-equiv=content-type content="text/html; charset=UTF-8">
<script language=javascript>
function test(){
var testInput=document.getElementById("test").value;
var len=test ...
truts2 拦截器.
某些操作需要用户登录后才能执行。
java 代码:
import java.util.Map;
import com.iss.beans.UserBean;
import com.iss.common.util.Constants;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
/**
* s ...
去掉字符串中的重复数据
- 博客分类:
- java
/** 去掉字符串中的重复数据 */
String s = "1559550232,1559550232," +
"301723410,301723410," +
"193888354,193888354,193888354," +
"458021114,458021114," +
"338738686," +
"201623,1997258619";
String[] arr = s.split(" ...
#error/warn/info/debug#
log4j.rootLogger=warn, stdout, file
#to console#
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH: ...
封装 lo4j (转)-02
- 博客分类:
- 其他
public void info(Object message) {
if (logger.isInfoEnabled()) {
forcedLog(logger, Level.INFO, message);
}
}
public void info(Object message, Throwable t) {
if (logger.isInfoEnabled()) {
forcedLog(logger, Level.INFO, message, t);
}
}
public void info(String pattern, O ...