包含标签:Java 的文章
-
Hibernate dialect property: Specifies the SQL dialect of the database
hibernate. Dialect = attribute value Example 1 <property name="hibernate.dialect"> org.hibernate.dialect.sq…… -
Spring queryforint method: int type single value query
Grammar 1 queryForInt(String sql) Example public int getUserCount(){ String sql = "SELECT count(*)FROM tb_user"; …… -
Hibernate min method: calculate the minimum value of a column
min(String propertyName) Example Criteria criteria = session.createCriteria(ResultForm.class); //获取Criteria对象 …… -
Hibernate Max method: calculate the maximum value of a column
max(String propertyName) Example Criteria criteria = session.createCriteria(ResultForm.class); //获取Criteria对象 …… -
JSP JSTL < x: parse > tag: parses the specified XML content
XML Document to parse Example <%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> <%@…… -
Hibernate rowcount method: returns the number of records that meet the condition
rowCount() Example Criteria criteria = session.createCriteria(UserForm.class); //创建Criteria对象 criteria.add(Res…… -
Logistics distribution system for Java project
Development background requirement analysis Necessity analysis System objectives System functional structure System de…… -
Basic elements of Java programs
identifier keyword notes import java.applet.*; //导入java.applet包下的所有类 import java.awt.*; //导入java.a…… -
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…… -
Java check file name and email address
public static void main(String[] args) { boolean filecon = false; // 判断文件名是否合法 boolean emailcon =…… -
JSP headervalues object: get all header values of HTTP request
${headerValues.expression} Example ${headerValues["user-agent"]} -
Struts 2 merge tag: merge collection tag
< s: merge id = "mm" > < s: param value = "{'Java Web development practice classic', 'JavaWeb example classic…… -
Struts 2 “#” symbol: get the data in the collection and select it
Syntax: list. {?#conditional expression>value} For example, if a collection contains multiple student objects, obta…… -
Setstring method of Hibernate query interface: bind parameters with mapping type of string
Grammar 1 setString(int position,String val) Example String hql = "from UserForm where sex=?"; //定义查询HQL语句 Q…… -
Java judges leap year and average year and outputs the number of days of a month
import java.util.Scanner; public class Test27 { public static void main(String[] args) { // 在这里编…… -
JSP JSTL < SQL: query > tag: query through SQL statement
Syntax: The syntax format without query conditions is as follows: actions The syntax format of query cri…… -
What are the mainstream java web development frameworks?
Mainstream Java Web Development Framework 1) Spring framework 2) Spring MVC framework 3) Mybatis framework The word "i…… -
Hibernate EQ method: set equal condition
eq(String propertyName,Object value) Example Criteria criteria = session.createCriteria(UserForm.class); //定义Crit…… -
Detailed explanation of java file class (file operation class)
Get file properties Example 1 public class Test02 { public static void main(String[] args) { String pa…… -
JSP JSTL < C: otherwise > tag: Specifies the default processing logic tag
< C: otherwise > label body < / C: otherwise > Example <%@page import="java.util.*"%> <%@tag…… -
Createcriteria method of Hibernate criteria interface: create a new criteria object
createCriteria(String associationPath) Example Session session = sessionFactory.openSession(); //获取session对象 C…… -
Hibernate query interface setboolean method: bind parameters with mapping type of Boolean
Grammar 1 setBoolean(int position,boolean val) Example String hql = "from UserForm where isDel=?"; //定义HQL语句 Q…… -
Hibernate show_ SQL attribute: Specifies whether to output SQL statements
hibernate. show_ SQL = attribute value Example <property name="hibernate.show_sql"> true </property>…… -
Spring delete method: deletes the specified entity data
delete(Object entity) Example public void delBoyUser(TbUser user){ HibernateTemplate htm = getHibernateTemplate()…… -
Struts 2 checkboxlist tag: create multiple checkboxes at a time
< / s: check@R_947_2419 @List > / / display of multiple selection boxes < / s: Form > Examp…… -
Servlet life cycle (illustration)
Methods related to servlet life cycle 1) Init() method 2) Service() method 3) Destroy() method Servlet lifecycle (thre…… -
Hibernate Ge method: set the condition greater than or equal to
ge(String propertyName,Object value) Example Criteria criteria = session.createCriteria(UserForm.class); //创建Crit…… -
Does java have multidimensional arrays?
type[][] arrName; arrName = new type[length][] public class TwoDimensionTest { public static void main(String[]…… -
Struts2 ActionContext. getContext(). Get (object key) method: get the request of map type
public Object get(Object key) Map request = ActionContex.getContext.get("request"); @H_404_7@ 说明:ActionContext …… -
Detailed explanation of Java break statement
Terminate a sequence of statements in a switch statement Use the break statement to forcibly exit the loop directly Ex…… -
-
JSP JSTL < C: out > tag: output tag
grammar Syntax format 1: Syntax format 2: defalultValue Example <%@taglib prefix="c" uri="http://java.……