ÎҵĵÚÒ»¸öFreeMarkerÄ£°åÉú³Éjava´úÂëµÄÀý×Ó
µÚÒ»²½.н¨Ò»¸öÄ£°åÎļþÒÔ.ftl½áβ¡£
IDAO.ftl
package com.media.dao;
import java.util.List;
import com.media.bean.${model_name};
import com.media.exceptions.DAOException;
/**
* ${model_name_cn}½Ó¿Ú
*
* @author ${author}
* @link ${link}
*
* @version $Revision: 1.00 $ $Date: ${date?string("yyyy-MM-dd HH:mm:ss")}
*/
public interface I${model_name}DAO extends IGenericDAO<${model_name}>{
/**
* ¸ù¾Ý${model_name_cn}±àºÅ²éÕÒ${model_name_cn}ÐÅÏ¢
*
* @param ${instant}Id ${model_name_cn}񅧏
* @return ${model_name} ${model_name_cn}¶ÔÏó
* @throws DAOException
*/
public ${model_name} find${model_name}ById(Long ${instant}Id) throws DAOException;
/**
* ÅúÁ¿ÎïÀíɾ³ý${model_name_cn}(²»¿É»Ö¸´)
* @param ${instant}Ids ${model_name_cn}񅧏
* @throws DAOException
*/
public void delete${model_name_list}(Long[] ${instant}Ids) throws DAOException;
/**
* ÎïÀíɾ³ý${model_name_cn}(²»¿É»Ö¸´)
* @param ${instant}Id ${model_name_cn}񅧏
* @throws DAOException
*/
public void delete${model_name}(Long ${instant}Id) throws DAOException;
/**
* ±£´æ${model_name_cn}
* @param ${instant}
* @throws DAOException
*/
public void save${model_name}(${model_name} ${instant}) throws DAOException;
/**
* ¸üÐÂ${model_name_cn}
* @param ${instant}
* @throws DAOException
*/
public void update${model_name}(${model_name} ${instant}) throws DAOException;
/**
* ÀûÓÃhqlÓï¾ä²éѯ${model_name_cn}ÐÅÏ¢
* @param hsql
* @throws DAOException
*/
public List<${model_name}> find${model_name_list}(String hsql) throws DAOException;
/**
* ÀûÓÃhqlÓï¾ä²éѯ${model_name_cn}ÐÅÏ¢
* @param hsql
* @throws DAOException
*/
public List<${model_name}> find${model_name_list}(String hsql,Object[] params) throws DAOException;
}
µÚ¶þ²½.дһ¸öfreemakerµÄ¹¤¾ßÀàÓÃÓÚÉú³É´úÂë¡£
FreeMarkerUtil.java
×¢Ò⣺¹¤³Ì±ØÐëÒýÈëfreemaker.jar
package com.media.test;
impor
Ïà¹ØÎĵµ£º
ÓÉÓÚ¹¤×÷ÐèÒª£¬ÒªÓÃ.netµÄ³ÌÐòµ÷ÓÃÒ»¸öjava±àдµÄweb service½Ó¿Ú£¬½Ó¿ÚµÄÒ»¸ö²ÎÊýÒªÇómd5·½Ê½¼ÓÃÜ¡£
.netÖеÄmd5¼ÓÃÜÊǺÜÈÝÒ׵쬲ÉÓÃmsdnÖиø³öµÄ·½·¨:
// Hash an input string and return the hash as
// a 32 character hexadecimal string.
static string getMd5Hash(string input)
{
......
package com.joe;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Test
{
//½«×Ö·û´®µÄÊý×Ö×Ö·ûÊä³ö
public static void main(String[] args)
{
String str = "iu7i8hy4j ......
¡¾ÎÄÕ±êÌâ¡¿javaС³ÌÐò£¨1£©
¡¾ÎÄÕÂ×÷Õß¡¿Ôø½¡Éú
¡¾×÷ÕßÓÊÏä¡¿zengjiansheng1@126.com
¡¾×÷ÕßQQ¡¿190678908
¡¾×÷ÕßÉùÃ÷¡¿±¾ÈËˮƽÓÐÏÞ£¬Ê§ÎóÖ®´¦£¬¾´Çë¸÷λָ³ö¡£±¾ÈËÒÔǰдµÄһЩС³ÌÐò£¬·ÖÏíÒ»ÏÂÏ£Íû¶Ô¸÷λѧϰjavaÓаïÖú ^-^
***************************************************************************** ......
¡¾ÎÄÕ±êÌâ¡¿javaС³ÌÐò£¨2£©
¡¾ÎÄÕÂ×÷Õß¡¿Ôø½¡Éú
¡¾×÷ÕßÓÊÏä¡¿zengjiansheng1@126.com
¡¾×÷ÕßQQ¡¿190678908
¡¾×÷ÕßÉùÃ÷¡¿±¾ÈËˮƽÓÐÏÞ£¬Ê§ÎóÖ®´¦£¬¾´Çë¸÷λָ³ö¡£±¾ÈËÒÔǰдµÄһЩС³ÌÐò£¬·ÖÏíÒ»ÏÂÏ£Íû¶Ô¸÷λѧϰjavaÓаïÖú ^-^
***************************************************************************** ......
1. Êý×éÓÐûÓÐlength()Õâ¸ö·½·¨? StringÓÐûÓÐlength()Õâ¸ö·½·¨£¿
´ð£ºÊý×éûÓÐlength()Õâ¸ö·½·¨£¬ÓÐlengthµÄÊôÐÔ¡£
StringÓÐlength()Õâ¸ö·½·¨¡£
2. String s = new String("xyz");´ ......