Recent Posts
-
Encryption and decryption of Java strings
public static String encryptAndDencrypt(String value,char secret) { byte[] bt = value.getBytes(); // 将需要加密…… -
Struts 2 checkboxlist tag: create multiple checkboxes at a time
< / s: check@R_947_2419 @List > / / display of multiple selection boxes < / s: Form > Examp…… -
Java check file name and email address
public static void main(String[] args) { boolean filecon = false; // 判断文件名是否合法 boolean emailcon =…… -
Library management system for Java project practice (with source code and analysis)
Development background requirement analysis System objectives System functional structure System flow development envi…… -
JSP Response. Isnew() method: judge whether the current user is a new user
isNew() Example <% out.print(session.isNew()); %> -
Hibernate addentity method: Associate alias with entity class
Grammar 1 addEntity(Class entityClass) Example Session session = sessionFactory.openSession(); //定义Sesssion对象 …… -
Spring GetPassword method: get the password of the database
getpassword() Example public static void main(String[] args){ String driver = "com.MysqL.jdbc.Driver"; String …… -
Hibernate or method: logic or operation
or(Criterion lhs,Criterion rhs) Example Criteria criteria = session.createCriteria(PersonForm.class); //定义Criteri…… -
Hibernate hibernate. transaction. factory_ Class attribute: sets the transaction management type
hibernate. transaction. factory_ Class = attribute value Example <property name="hibernate.transaction.factory_cl…… -
Hibernate wascommitted method: judge whether the transaction is committed
wasCommitted() Example session.saveOrUpdate(uf); //调用插入数据方法 if(tx.wasCommitted()){ //判断事务是否已经被提…… -
JSP JSTL < C: URL > tag: generate URL address tag
Syntax: Syntax format 1: Syntax format 2: Example <%@page import="java.util.*"%> <%@taglib…… -
Introduction to common methods of string API
1)char charAt (int index) 2)int codePointAt(int index) 5.0 3)int offsetByCodePoints(int startIndex,int cpCount) 5.0…… -
Hibernate generate_ Statistics property: collect statistics
hibernate. generate_ Statistics = attribute value Example <property name="hibernate.generate_statistics"> t…… -
Struts 2 iterator tag: tag of iterative data
< s: iterator value = "collection element" id = "ID number" status = "instance name" > < s: property / > &…… -
JSP Response. Setstatus() method: sets the status code of the response
setStatus(int sc) Example <% response.setStatus(200); %> -
JSP JSTL < FMT: bundle > tag: read binding message resources
body content Example <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <fmt:bundle…… -
Java instance guessing numbers games
count=0 way=0 public class BullCows { /** * 负责调用对应的方法,实现整个案例的逻辑关系 * * @p…… -
Spring delete method: deletes the specified entity data
delete(Object entity) Example public void delBoyUser(TbUser user){ HibernateTemplate htm = getHibernateTemplate()…… -
Spring istypematch method: determines whether the JavaBean matches the specified type
isTypeMatch(String name,Class targetType) Example public static void main(String[] args){ ApplicationContext cont…… -
Hibernate load method: load entity objects through oid
load(Class theClass,Serializable id) Example Session session = sessionFactory.openSession(); //创建Session对象 Use…… -
Hibernate AVG method: calculate the average value of a column
avg(String propertyName) Example Criteria criteria = session.createCriteria(ResultForm.class); //定义Criteria对象 …… -
-
Java digital to RMB reading method (with source code and analysis)
More than 12 will not be considered for the time being. import java.util.Arrays; import java.util.Scanner; publi…… -
JSP Response. Getcreationtime () method: get the time when the session object was created
getCreationTime() Example <% session.setAttribute("user","zs"); long timenum = session.getCreationTime(); …… -
JSP header object: get a specific header value of HTTP request
${header.expression} Example ${header.host} ${header[host]} -
JSP sessionscope object: an implicit object that accesses the session scope
${sessionScope.expression} Example ${sessionScope.user} Typical application <body> <p>EL对象使用<…… -
JSP JSTL < C: remove > tag: remove tag
Example <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <c:set var="name" value="C语言…… -
Common problems and misunderstandings about Java static
Use misunderstanding public class Student { public static String name = "张三"; private static int age = 1…… -
JSP JSTL < FMT: Message > tag: reading local messages
Grammar 1 Grammar 2 subtags Example <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt…… -
-
JSP Response. Getmaxinactivival() method: get the valid time of the session
getMaxInactiveInterval() Example <% long timeNum = session.getMaxInactiveInterval(); out.println("这个sessi…… -
Detailed explanation of Java static static modifiers: static variables, static methods and static code blocks
类名.静态成员 Static variable public static double PI = 3.14159256; Example 1 public class StaticVar { publ……