SSM 最简单最全面的整合Spring+SpringMVC+Mybatis三大框架 快速搭建

2.8.2

org.mybatis.generator

mybatis-generator-maven-plugin

1.3.2

true

true

然后jdbc.properties:

driver=com.mysql.jdbc.Driver

#game_message为我本地的数据库名

url=jdbc:mysql://localhost:3306/game_message?useUnicode=true&characterEncoding=utf-8

username=root

#下面输入自己数据库的密码

password=root

#定义初始连接数

initialSize=0

#定义最大连接数

maxActive=20

#定义最大空闲

maxIdle=20

#定义最小空闲

minIdle=1

#定义最长等待时间

maxWait=60000

然后log4j.properties:

#log4j.rootLogger=debug,console,debug,info,warn,error,fatal

log4j.rootLogger=INFO,info,warn,error,fatal

log4j.appender.console=org.apache.log4j.ConsoleAppender

log4j.appender.console.layout=org.apache.log4j.PatternLayout

log4j.appender.console.Encoding=UTF-8

log4j.appender.console.layout.ConversionPattern= %p %d{MM-dd_HH:mm:ss} %F %L %m %n

#log4j.logger.java.sql.ResultSet=INFO

#log4j.logger.org.apache=INFO

#log4j.logger.java.sql.Connection=INFO

#log4j.logger.java.sql.Statement=DEBUG

log4j.logger.java.sql.ResultSet=INFO

log4j.logger.org.apache=INFO

log4j.logger.java.sql.Connection=DEBUG

log4j.logger.java.sql.Statement=DEBUG

log4j.logger.java.sql.PreparedStatement=DEBUG

log4j.logger.org.springframework=ERROR

log4j.logger.org.mybatis=ERROR

log4j.logger.org.hibernate=ERROR

log4j.logger.com.mchange=ERROR

log4j.logger.org.quartz=ERROR

log4j.logger.debug=debug

log4j.appender.debug=org.apache.log4j.DailyRollingFileAppender

log4j.appender.debug.layout=org.apache.log4j.PatternLayout

log4j.appender.debug.layout.ConversionPattern= %p %d{MM-dd_HH:mm:ss} %F %L %m %n

log4j.appender.debug.datePattern='.'yyyy-MM-dd-HH

log4j.appender.debug.Threshold=DEBUG

log4j.appender.debug.append=true

log4j.appender.debug.Encoding=UTF-8

log4j.appender.debug.File=${loghome}/mall_debug.log

log4j.logger.info=info

log4j.appender.info=org.apache.log4j.DailyRollingFileAppender

log4j.appender.info.layout=org.apache.log4j.PatternLayout

log4j.appender.info.layout.ConversionPattern= %p %d{MM-d

你可能感兴趣的:(程序员,面试,java,后端)