![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring
文章平均质量分 78
lgl5519291
这个作者很懒,什么都没留下…
展开
-
spring 读取properties配置文件
在Spring中,使用PropertyPlaceholderConfigurer和PropertyOverrideConfigurer可以在XML配置文件中加入外部属性文件但使用这种方式,有一些需要注意的地方1.首先在主类中,需要使用ClassPathXmlApplicationContext来读取spring配置xml文件如:ApplicationContext context = new Cl...原创 2010-07-15 22:40:13 · 100 阅读 · 0 评论 -
DataFieldMaxValueIncrementer 管理主键
package com.sise.spring.dao.impl;import java.sql.PreparedStatement;import java.sql.SQLException;import java.util.List;import org.springframework.dao.DataAccessException;import org.spri...原创 2010-06-17 13:25:11 · 282 阅读 · 0 评论 -
使用commons-codec包加密字符串(MD5,SHA1,BASE64)
commons-codec包可以从apache下载,最新版是1.3不可逆算法1.MD5<!---->String str = "abc";DigestUtils.md5Hex(str);附.net生成MD5的方法,生成内容跟java一致:<!---->String str = "abc";FormsAuthentication.HashPasswor...原创 2010-06-26 17:01:35 · 84 阅读 · 0 评论 -
MD5带盐值的java加密算法
import java.security.MessageDigest;public class PasswordEncoder { private final static String[] hexDigits = { "0", "1", "2", "3", "4", "5", "6", "7", "8"原创 2010-06-27 00:03:07 · 108 阅读 · 0 评论 -
Struts2、Hibernate、Spring整合时如何向Servlet注入属性
1.Spring数据库的配置<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmln...原创 2010-06-29 16:30:01 · 84 阅读 · 0 评论