-01 towering building a stage, the primary foundation - Chapter 3 registered user login module development -3-18 open MyBatis log Sql Print

In the generic Mapper did not let ourselves go write some sql statement.
Let Log Print sql statement per execution. Sql statement only suitable for printing in a production environment, if it is in a formal environment logs will be very much redundancy is not necessary. Once a large amount of user requests will increase. Many repeat sql statement will be printed on the console.

Log profile. stdout is to represent the output in the console.

appication.yml. This is Mybatis log


in the console output has a StdOutImpl, this is achieved in the console output log.




Api restart the service. It indicates the initialization log.

It is an adapter.


Make a landing operation.

Landed successfully.








This is the query parameter types are of type String.

If the query to it, there will be a total ,. Representatives of a record.

Query uses 5 ms. Before the log output aop.

Saving operation

Register an account





value parameter

update to the number of rows inside the database.


6 millisecond time-consuming service




by configuring it to monitor each database sql statement calling

End

 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/12093703.html
Recommended