On the design of table structure
1. It is suggested that the field name is lowercase and if multiple words are separated by an underscore.
2. It is recommended that each table have a unique primary key field, and the field name is an ID, and you can use the self-added primary key.
3. Data types as unified as possible, do not appear too many data types. about the use of log4j
Log4j.rootlogger=error,console,file
The above configuration indicates that the log level is set to error and provides two kinds of log appender, console and file respectively, which need to be configured separately for these two types of logs
Log4j.logger.org.smart4j=debug
Specifies that only classes under the ORG.SMART4J package can output debug-level logs on the use of threadlocal
When using static member variables in a class, be sure to ask yourself whether this static member variable needs to be considered thread-safe. So does multiple threads need to enjoy their own member variables? If you need to consider, you may want to use threadlocal database transactions
How do I get the default transaction isolation level for a database?
DatabaseMetaData meta = Dbutil.getdatasource (). getconnection (). GetMetaData ();
int defaultisolation = Meta.getdefaulttransactionisolation ();
How does a database isolate a transaction?
Use lock this thing, when inserting the data to lock the table; Lock line TIPS when data is updated
1. In the MAVEN project Main/java, Main/resources, Test/java, test/resources these four directories are the root directory of Classpath
2.Controller, in the ordinary request can return JSP page; The JSON data needs to be returned under the AJAX request