Recent Posts
-
JSP JSTL < C: out > tag: output tag
grammar Syntax format 1: Syntax format 2: defalultValue Example <%@taglib prefix="c" uri="http://java.…… -
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…… -
Spring queryforint method: int type single value query
Grammar 1 queryForInt(String sql) Example public int getUserCount(){ String sql = "SELECT count(*)FROM tb_user"; …… -
Spring saveOrUpdate method: saves or updates entity objects
saveOrUpdate(Object entity) Example 1 public static void main(String[] args){ ApplicationContext context = new Cl…… -
Hibernate cache. use_ second_ level_ Cache attribute: determines whether to close the L2 cache
hibernate. cache. use_ second_ level_ Cache = attribute value Example <property name="hibernate.cache.use_second_…… -
Hibernate criteria interface list method: returns a list collection
list() Example Session session = sessionFactory.openSession(); //获取session对象 List list = null; try{ Criter…… -
Mutual conversion of Java array and string
Convert string to array String str = "123abc"; char[] arr = str.tocharArray(); // char数组 for (int i = 0; i &l…… -
Java package: Java system package and custom package
System package Custom package 1. Declaration of package package 包名; 2. Use of package example.Test test = new ex…… -
Java RandomAccessFile class: dynamic reading of file contents
Example 1 public class RandomAccessFileDemo { public static void main(String[] args) { try { …… -
Development of local information website of Java project (similar to 58 local)
Development background System objectives System functional structure System flow System Preview Build development envi…… -
The difference between Java abstract classes and interfaces
1) Abstract class 2) Interface 3) The difference between abstract classes and interfaces 4) Application scenarios of a…… -
JSP pagecontext object: access JSP built-in objects
${PageContext.request[expression]} Example ${PageContext.session.username} -
How Java creates projects
Example 1 public class HelloJava { public static void main(String[] args) { //TODO自动生成的方法…… -
Setmaxresults method of Hibernate query interface: set the maximum number of returned records
setMaxResults(int maxResults) Example Session session = sessionFactory.openSession(conn); //获取session对象 String…… -
Struts 2 basic configuration file
<struts> <!—设置常量的值--> <constant name="name" value="value"></constant> …… &…… -
Spring getbeansoftype method: get the JavaBean of the specified type
getBeansOfType(Class type) Example public static void main(String[] args){ ApplicationContext context = new Class…… -
-
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…… -
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 GetUserName method: get the user name to access the database
getUsername() Example public static void main(String[] args){ String driver = "com.MysqL.jdbc.Driver"; String …… -
JSP Response. Setcontenttype() method: sets the MIME type of the response object
setContentType(String type) Example <% response.setContentType("video/x-msvideo"); %> -
Java final modifier: final modifier attribute, final modifier method and final modifier class
1. Final modifies the attributes in the class 2. Methods in final modifier class 3. Final modifier class Example 1 p…… -
The difference between dynamic web pages and static web pages
Static web page Dynamic web page Advanced -
Hibernate createquery method: creates a query object
createQuery(String queryString) Example Session session = sessionFactory.openSession(); //定义Session对象 String h…… -
Spring getconnectionproperties method: get database connection properties
getConnectionProperties() Example public static void main(String[] args){ String driver = "com.MysqL.jdbc.Driver"…… -
What technology stacks do Ali P8 Java senior architects need to master?
Overall architecture design of intelligent Internet Philosophical essence of Internet super large scale architecture d…… -
JSP JSTL < x: set > tag: save XML node
Example <%@taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> <%@taglib prefix="c" uri="ht…… -
Hibernate and method: logic and operation
and(Criterion lhs,Criterion rhs) Example Criteria criteria = session.createCriteria(UserForm.class); //获取Criteria…… -
What about Java null objects?
Student stu = new Student(); // Statement 1 student stu2// Statement 2 stu2 = new student()// Statement 3 String str1=…… -
JSP Response. Getid () method: get a unique ID ID
getId() Example <% String ID = session.getId(); out.println("这个session的ID是:"+ID); %> -
Struts 2 interceptor interface: interceptor
Syntax: public interface Interceptor extends Serializable{ void destroy(); void init(); String intercept(Ac…… -
JSP Response. Senderror() method: sends an error message to the client
sendError(int sc) Example <% response.sendError(404); %>