SQL try not to splice precompiled mode/parameterized SQL
-----Prevent SQL Injection
--sql injection is the execution of a malicious SQL command by inserting a SQL command into a Web form to commit or entering a query string for a domain name or page request, eventually spoofing the server.
Force release Port
1, get the PID of the occupied port. Open cmd, command: Netstat-a-O.
2, forcibly released. Command: Ntsd-c q-p PID.
In Struts2 JSP
Generate hyperlink arguments in iterration with%{# X.name} can also be used in the URL tag with the "param" parameter
Web Multithreading security issues
Multi-Stroke Class Property location cannot place a property that needs to change the value
For example:
The use of Connection Statement ResultSet in JDBC is placed in the position of the class attribute (member variable) when multiple trip accesses if one thread gets Connection after blocking another thread runs after replacing Connection use after closing the blocking thread Run the value to close the throw exception
Interface Name
IXXXX-----begins with I
When reading a database, it is sometimes necessary to turn on a transaction to prevent errors such as dirty read and false reading
Stringutil.join (List, ","); Concatenation of a set of comma-stitched output strings
Java Cross-platform automatic garbage collection
Learning Framework (Spring)
Entry procedure--dispatcherservlet
Core Configuration--[servlet-name]-servlet.xml
Control Logic--usercontroller
Servlet Three techniques: servlet filter Listener
Class. Class.getclassloader (). GetResource (""). GetPath ()--------Get the Directory of the class (implemented through the ClassLoader)
Read Db.properties file
InputStream Resourceasstream = JdbcUtil.class.getClassLoader (). getResourceAsStream ("db.properties");
Loading the contents of the Db.properties file into info
Info.load (Resourceasstream);
-------------Read and load the resource file Db.properties
A Java file can write more than one class but the permissions of the class are only public default two kinds
A Java file can have more than one Java class Java file name must be the same as the public class name in the file, so a Java file class has only one public
Class of common method extraction for slices
Methods for notifying slice classes
The pointcut adds the notification to the target class's location
Weave in to add notice to the entry point
Integration steps
Persistent layer-to-DAO layer--Service layer---> Action layer
1. Create a project import jar to establish a basic backage
3. Set up Database write JavaBean
Java Knowledge Summary-24