SpringMVC + Spring + MyBatis Study Notes: added the SQL printing function for MyBatis (simplified configuration), springmvcmybatis

Source: Internet
Author: User

SpringMVC + Spring + MyBatis Study Notes: added the SQL printing function for MyBatis (simplified configuration), springmvcmybatis

System: WIN8.1

Database: Oracle 11GR2

Development Tool: MyEclipse 8.6

Framework: Spring3.2.9, SpringMVC3.2.9, and MyBatis3.2.8

1. Copy the following jar package to the lib directory

 

2. Add the log4j. properties file in the src directory. The content is as follows:

1 # Global logging configuration2 log4j. rootLogger = ERROR, stdout3 # log4j. logger is followed by the Project dao package path, all of which are dao-layer interfaces.4 log4j.logger.com. kickstarter. dao = TRACE5 # Console output...6. log4j. appender. stdout = org. apache. log4j. leleappender7 log4j. appender. stdout. layout = org. apache. log4j. patternLayout8 log4j. appender. stdout. layout. conversionPattern = % 5 p [% t]-% m % n

The configuration is complete. TRACE can also be configured as DEBUG output.

 

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.