包含标签:Java 的文章
-
Online examination system for Java project practice (with source code and analysis)
Development background requirement analysis System objectives Functional structure System business process development…… -
Java 9 enhanced “diamond” syntax
List<String> strList = new ArrayList<String>(); Map<String,Integer> scores = new HashMap<Strin…… -
JSP JSTL < x: choose > tag: complete condition judgment
body content( and subtags) Example <%@taglib prefix="x" uri="http://java.sun.com/jsp…… -
Hibernate load method: load entity objects through oid
load(Class theClass,Serializable id) Example Session session = sessionFactory.openSession(); //创建Session对象 Use…… -
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…… -
Hibernate query interface setentity method: used to bind entity class parameters
setEntity(String name,Object val) Example Dept d = new Dept(); //定义表示部门实体的JavaBean对象 d.setId(3); //设…… -
New method for map in Java 8
public class MapTest { public static void main(String[] args) { Map map = new HashMap(); // …… -
JSP JSTL < x: when > Tags: execute code according to conditions
< x: when select = "XPATHexpression" > body content < / X: when > Example <%@taglib prefix="x" uri="h…… -
Hibernate hibernate. use_ sql_ Comments attribute: Specifies whether to output comment information
hibernate. use_ sql_ Comments = attribute value Example <property name="hibernate.use_sql_comments"> true …… -
Struts 2 set tag: defines a variable
Example <body> <!--将表达式user.username的值保存在默认范围中,即action范围--> <s:set name="…… -
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……