SPRINGMVC + Spring + MyBatis Learning Note: Add print SQL functionality to MyBatis (most simplified configuration)

Source: Internet
Author: User
Tags log4j

System: WIN8.1

Database: Oracle 11GR2

Development tools: MyEclipse 8.6

Frames: Spring3.2.9, SpringMVC3.2.9, MyBatis3.2.8

1. Copy the following jar packages to the Lib directory

2, in the SRC directory to increase the log4j.properties file, the content is as follows

1 # Global logging configuration 2 log4j.rootlogger=ERROR, stdout3 # Log4j.logger followed by the project DAO package path, inside all are the DAO layer interface 4 Log4j.logger. Com.kickstarter.dao=TRACE5 # Console output ... 6 log4j.appender.stdout=org.apache.log4j.ConsoleAppender7 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout8 log4j.appender.stdout.layout.conversionpattern=%5p [%t]-%m%n

Configuration is complete. Trace can also be configured as debug output.

Springmvc + Spring + MyBatis Learning Note: Add print SQL functionality to MyBatis (most simplified configuration)

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.