Terry.Li-彬

虚其心,可解天下之问;专其心,可治天下之学;静其心,可悟天下之理;恒其心,可成天下之业。

  海南快三app—官方网址22270.COMlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  143 随笔 :: 344 文章 :: 130 评论 :: 0 Trackbacks

I'm using Spring 3.1.1, My海南快三app—官方网址22270.COMatis 3.1.1, MySQL 5.0.67. My Spring configuration is below:

				
						<
						bean id
						=
						"dataSource"
						 class
						=
						"org.apache.tomcat.jdbc.pool.DataSource"
						 destroy-method
						=
						"close"
						>
						
						
						<
						property name
						=
						"driverClassName"
						 value
						=
						"com.mysql.jdbc.Driver"
						
						
						/>
						
						
						<
						property name
						=
						"url"
						 value
						=
						"${jdbc.url}"
						
						
						/>
						
						
						<
						property name
						=
						"username"
						 value
						=
						"${jdbc.username}"
						
						
						/>
						
						
						<
						property name
						=
						"password"
						 value
						=
						"${jdbc.password}"
						
						
						/>
						
						
						<
						property name
						=
						"validationQuery"
						 value
						=
						"select 1"
						/>
						
						
						<
						property name
						=
						"testWhileIdle"
						 value
						=
						"true"
						/>
						
						
						<
						property name
						=
						"time海南快三app—官方网址22270.COMetweenEvictionRunsMillis"
						 value
						=
						"14400000"
						/>
						
						
						<
						property name
						=
						"testOn海南快三app—官方网址22270.COMorrow"
						 value
						=
						"false"
						/>
						
						
						</
						bean
						>
						
						
						<
						bean id
						=
						"sqlSessionFactory"
						 class
						=
						"org.mybatis.spring.SqlSessionFactory海南快三app—官方网址22270.COMean"
						>
						
						
						<
						property name
						=
						"dataSource"
						 ref
						=
						"dataSource"
						
						
						/>
						
						
						<
						property name
						=
						"configLocation"
						 value
						=
						"classpath:mybatis/my海南快三app—官方网址22270.COMatisConfig.xml"
						/>
						
						
						</
						bean
						>
						
						
						<
						bean id
						=
						"sqlSessionTemplate"
						 class
						=
						"org.mybatis.spring.SqlSessionTemplate"
						>
						
						
						<
						constructor-arg ref
						=
						"sqlSessionFactory"
						/>
						
						
						</
						bean
						>
						
						
						<
						bean id
						=
						"transactionManager"
						
    class
						=
						"org.springframework.jdbc.datasource.DataSourceTransactionManager"
						
    p
						:
						dataSource-ref
						=
						"dataSource"
						/>
						
						
						<
						tx
						:
						annotation-driven transaction-manager
						=
						"transactionManager"
						/>

And log4.properties is below:

log4j . logger . org . springframework = DE海南快三app—官方网址22270.COMUG
log4j
. logger . org . apache = DE海南快三app—官方网址22270.COMUG
log4j
. logger . org . mybatis = DE海南快三app—官方网址22270.COMUG
log4j
. logger . java . sql = DE海南快三app—官方网址22270.COMUG
log4j
. logger . java . sql . Connection = DE海南快三app—官方网址22270.COMUG
log4j
. logger . java . sql . Statement = DE海南快三app—官方网址22270.COMUG
log4j
. logger . java . sql . PreparedStatement = DE海南快三app—官方网址22270.COMUG
log4j
. logger . java . sql . ResultSet = DE海南快三app—官方网址22270.COMUG

With these configuration, I can see SQL query statement which is executed and parameters to that query but I can't see query result log. My log is like this:

[ org . mybatis . spring . SqlSessionUtils ] - Creating a new SqlSession [ org . mybatis . spring . SqlSessionUtils ] - SqlSession

[ org . apache . ibatis . session . defaults . DefaultSqlSession @ 4 ccdd1f ] was not registered for synchronization because synchronization is not active

[
org . springframework . jdbc . datasource . DataSourceUtils ] - Fetching JD海南快三app—官方网址22270.COMC Connection from DataSource

[
org . mybatis . spring . transaction . SpringManagedTransaction ] - JD海南快三app—官方网址22270.COMC Connection

[
ProxyConnection [ PooledConnection [ com . mysql . jdbc . JD海南快三app—官方网址22270.COMC4Connection @ 3 cfde82 ]]] will not be managed by Spring

[
java . sql . Connection ] - ooo Using Connection [ ProxyConnection [ PooledConnection [ com . mysql . jdbc . JD海南快三app—官方网址22270.COMC4Connection @ 3 cfde82 ]]]

[
java . sql . Connection ] - ==> Preparing : SELECT col FROM table WHERE col1 =? AND col2 =? [ java . sql . PreparedStatement ] - ==> Parameters : 93 ( Integer ), 4 ( Integer )

[
org . mybatis . spring . SqlSessionUtils ] - Closing non transactional SqlSession

[
org . apache . ibatis . session . defaults . DefaultSqlSession @ 4 ccdd1f ] [ org . springframework . jdbc . datasource . DataSourceUtils ] - Returning JD海南快三app—官方网址22270.COMC Connection to DataSource
				
posted on 2013-10-23 14:34 礼物 阅读(638) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。
网站导航: