This project uses springboot + mybatis + logback. In order to print SQL on the console, various configurations have been made in the configuration file. All the methods available on the Internet have been tried, but SQL statements are still not printed.
This is indicated in the configuration file logging.level.cn . homecredit.sams.ddme . reconciliation.model.mapper=debug . still do not print SQL statements.
Another SpringBoot project, as like as two peas, is able to print SQL statements on the console. By comparing the differences between the two projects step by step, it is found that the project can be printed after the histrix package is introduced.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
In the end, I don’t know what the reason is, but after introducing this package, the problem is solved.
Note that this is only one of the possible reasons for this problem. In addition, there are many other problems that may result in the inability to print SQL on the console. You need to configure every step.
Read More:
- Solve the problem of using logback console to print log Chinese characters in IDEA as garbled characters
- Springboot print SQL log
- Springboot integrated with mybatis
- Springboot + mybatis plus transaction management
- The springboot integration mybatis reported an error. The parameter cannot be found
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- Mybatis automatically generated SQL error
- Mybatis plus method querytotal execution error of SQL
- Print regularly to activate the printer (for some printers that need to be activated to print)
- Solve the problem of error running console reported by pycharm Python console
- Solve the problem caused by: java.sql.SQLRecoverableException : IO error: connection reset related problems
- Solution of redisconnection factory in springboot2 not Autowired
- java.lang.IllegalStateException: Logback configuration error detected
- [Solved] org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.zyh.springboot.
- Mybatis database error java.sql.SQLException : Error setting driver on UnpooledDataSource. Caus
- In Python, print() prints to remove line breaks
- SQL 2005 remote connection error (provider: SQL network interface, error: 28 – the server does not support the requested protocol
- Vscode debug Java console input: evaluation failed because the thread is not suspended
- Solve the problem that springboot does not scan @ repository
- In chome browser, console reports an error but does not display it