Here are three ways to print logs: Console console, file files, database1. Download the lo4j jar package and import the project2. Because you want to add a log to the database, create a new library and create a new table for the print log.Create a
1) If you INSERT many rows from the same customer at the same time, use the INSERT statement of multiple value tables. This is faster than using separate INSERT statements (several times in some cases ). The code is as follows:Copy code Insert
First step: Install the Mybatis-generator plugin first; Step two: Create a MAVEN project and create a generatorconfig.xml under Src/main/resources Step Three: Configure the Generatorconfig.xml, which is configured as follows: < ;!
In the WEB Project, character sets are set in many places, so it is best to unify them. Otherwise, it is hard to find them when errors occur. utf8 is used as an example. This is my favorite character set, let's see where character sets are set.
After installation. Go to the command line
Mysql-uroot
The default password is empty, so you do not need to write it.
Logon with a password:
Mysql-uroot-pxxxxx
Change Password:
Mysqladmin-uroot password XXXXX
Modify the
Xml code Name="UserDatabase" Auth="Container" Type="Org. apache. catalina. UserDatabase" Description="User database that can be updated and saved" Factory="Org. apache. catalina. users.
Problem DescriptionThere is a mysql database, where a table field is:('Date' timestamp not null default '2017-00-00 00:00:00 ').Default value of date in database: 0000-00-00 00:00:00Java program throws the following error:... '2017-00-00 00:00:00
When the page value contains Chinese characters, you can use the filter to compile it. However, it is easy to use system. Out. println to output Chinese characters and insert it into mysql. It is garbled. (Chao, your free space may also be the
Log4j configuration file is used to set the recorder level, storage device, and layout. It can be connected to key = value format settings or XML format settings. Through configuration, you can create a log4j runtime environment.
1. Configuration
# Note: log4j. the properties file needs to be placed in the WEB-INF/classes directory. #1. log4j has five levels of logger: Fatal 0, error 3, warn 4, INFO 6, and debug 7 (Priority: Debug, then all logs are output) #2. configure the root logger. Its
1. Filter
The filter in servlet is a server program that implements the javax. servlet. Filter interface. It mainly serves to filter character encoding and make some business logic judgments. It works as long as you are on the web. if the XML file
As part of web development, database access is also essential. Let's take a look at JDBC first.
JDBC
JDBC (Java database connectivity) is an application programming interface (API). It describes a set of standard Java class libraries that access
Blog-roller weblogger, built under meeclipse
Blogtailatapachemyeclipsemysql
It is said that roller is the first choice for the secondary development Blog system abroad, but it was found that it was developed based on the netbeans project structure
Connect to the mysql database using java:
Because we have been using the XAMPP environment tool before, and then downloaded a WAMP to learn how to use PHP.
Both of them integrate the MYSQL database and click start MYSQL directly. This is very simple
An interface is used to mark a class. Different classes belong to different interfaces (through upward transformation). It is much easier to manage interfaces than to manage various classes, interfaces reflect abstract ideas. What is abstraction?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.